001
014
015 package com.liferay.portal.util.subscriptions;
016
017 import com.liferay.portal.model.Group;
018 import com.liferay.portal.model.RoleConstants;
019 import com.liferay.portal.model.User;
020 import com.liferay.portal.test.DeleteAfterTestRun;
021 import com.liferay.portal.util.test.GroupTestUtil;
022 import com.liferay.portal.util.test.UserTestUtil;
023
024 import org.junit.Before;
025
026
030 public abstract class BaseSubscriptionTestCase {
031
032 @Before
033 public void setUp() throws Exception {
034 group = GroupTestUtil.addGroup();
035
036 user = UserTestUtil.addGroupUser(group, RoleConstants.SITE_MEMBER);
037 }
038
039 protected long addBaseModel(long containerModelId) throws Exception {
040 return 0;
041 }
042
043 protected long addContainerModel(long containerModelId) throws Exception {
044 return 0;
045 }
046
047 protected void updateBaseModel(long baseModelId) throws Exception {
048 }
049
050 protected static final long PARENT_CONTAINER_MODEL_ID_DEFAULT = 0;
051
052 @DeleteAfterTestRun
053 protected Group group;
054
055 @DeleteAfterTestRun
056 protected User user;
057
058 }