Liferay 7.0-ce-b4

com.liferay.portlet.notifications.test
Class BaseUserNotificationTestCase

java.lang.Object
  extended by com.liferay.portlet.notifications.test.BaseUserNotificationTestCase

public abstract class BaseUserNotificationTestCase
extends Object


Field Summary
protected  Group group
           
protected  User user
           
protected  List<UserNotificationDelivery> userNotificationDeliveries
           
 
Constructor Summary
BaseUserNotificationTestCase()
           
 
Method Summary
protected abstract  BaseModel<?> addBaseModel()
           
protected  void addContainerModel()
           
protected  void deleteUserNotificationDeliveries()
           
protected  void deleteUserNotificationEvents(long userId)
           
protected abstract  String getPortletId()
           
protected  List<UserNotificationDelivery> getUserNotificationDeliveries(long userId)
           
protected  List<JSONObject> getUserNotificationEventsJSONObjects(long userId, long primaryKey)
           
protected  boolean isValidUserNotificationEventObject(long primaryKey, JSONObject userNotificationEventJSONObject)
           
 void setUp()
           
protected abstract  void subscribeToContainer()
           
 void tearDown()
           
 void testAddUserNotification()
           
 void testAddUserNotificationWhenEmailNotificationsDisabled()
           
 void testAddUserNotificationWhenNotificationsDisabled()
           
 void testAddUserNotificationWhenWebsiteNotificationsDisabled()
           
 void testUpdateUserNotification()
           
 void testUpdateUserNotificationWhenEmailNotificationsDisabled()
           
 void testUpdateUserNotificationWhenNotificationsDisabled()
           
 void testUpdateUserNotificationWhenWebsiteNotificationsDisabled()
           
protected abstract  BaseModel<?> updateBaseModel(BaseModel<?> baseModel)
           
protected  void updateUserNotificationDelivery(int notificationType, int deliveryType, boolean deliver)
           
protected  void updateUserNotificationsDelivery(boolean deliver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

group

@DeleteAfterTestRun
protected Group group

user

@DeleteAfterTestRun
protected User user

userNotificationDeliveries

protected List<UserNotificationDelivery> userNotificationDeliveries
Constructor Detail

BaseUserNotificationTestCase

public BaseUserNotificationTestCase()
Method Detail

setUp

public void setUp()
           throws Exception
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Throws:
Exception

testAddUserNotification

public void testAddUserNotification()
                             throws Exception
Throws:
Exception

testAddUserNotificationWhenEmailNotificationsDisabled

public void testAddUserNotificationWhenEmailNotificationsDisabled()
                                                           throws Exception
Throws:
Exception

testAddUserNotificationWhenNotificationsDisabled

public void testAddUserNotificationWhenNotificationsDisabled()
                                                      throws Exception
Throws:
Exception

testAddUserNotificationWhenWebsiteNotificationsDisabled

public void testAddUserNotificationWhenWebsiteNotificationsDisabled()
                                                             throws Exception
Throws:
Exception

testUpdateUserNotification

public void testUpdateUserNotification()
                                throws Exception
Throws:
Exception

testUpdateUserNotificationWhenEmailNotificationsDisabled

public void testUpdateUserNotificationWhenEmailNotificationsDisabled()
                                                              throws Exception
Throws:
Exception

testUpdateUserNotificationWhenNotificationsDisabled

public void testUpdateUserNotificationWhenNotificationsDisabled()
                                                         throws Exception
Throws:
Exception

testUpdateUserNotificationWhenWebsiteNotificationsDisabled

public void testUpdateUserNotificationWhenWebsiteNotificationsDisabled()
                                                                throws Exception
Throws:
Exception

addBaseModel

protected abstract BaseModel<?> addBaseModel()
                                      throws Exception
Throws:
Exception

addContainerModel

protected void addContainerModel()
                          throws Exception
Throws:
Exception

deleteUserNotificationDeliveries

protected void deleteUserNotificationDeliveries()
                                         throws Exception
Throws:
Exception

deleteUserNotificationEvents

protected void deleteUserNotificationEvents(long userId)
                                     throws Exception
Throws:
Exception

getPortletId

protected abstract String getPortletId()

getUserNotificationDeliveries

protected List<UserNotificationDelivery> getUserNotificationDeliveries(long userId)
                                                                throws Exception
Throws:
Exception

getUserNotificationEventsJSONObjects

protected List<JSONObject> getUserNotificationEventsJSONObjects(long userId,
                                                                long primaryKey)
                                                         throws Exception
Throws:
Exception

isValidUserNotificationEventObject

protected boolean isValidUserNotificationEventObject(long primaryKey,
                                                     JSONObject userNotificationEventJSONObject)
                                              throws Exception
Throws:
Exception

subscribeToContainer

protected abstract void subscribeToContainer()
                                      throws Exception
Throws:
Exception

updateBaseModel

protected abstract BaseModel<?> updateBaseModel(BaseModel<?> baseModel)
                                         throws Exception
Throws:
Exception

updateUserNotificationDelivery

protected void updateUserNotificationDelivery(int notificationType,
                                              int deliveryType,
                                              boolean deliver)
                                       throws Exception
Throws:
Exception

updateUserNotificationsDelivery

protected void updateUserNotificationsDelivery(boolean deliver)
                                        throws Exception
Throws:
Exception

Liferay 7.0-ce-b4