com.silverpeas.web.mock
Class PersonalizationServiceMockWrapper

java.lang.Object
  extended by com.silverpeas.web.mock.PersonalizationServiceMockWrapper
All Implemented Interfaces:
PersonalizationService

@Named(value="personalizationService")
@Default
public class PersonalizationServiceMockWrapper
extends Object
implements PersonalizationService

A wrapper around a PersonalizationController mock for testing purpose. It is managed by the IoC container and it plays the role of a PersonalizationController instance for the business objects involved in a test. For doing, it delegates the invoked methods to the wrapped mock. You can get the wrapped mock for registering some behaviours an PersonalizationController instance should have in the tests.


Field Summary
 
Fields inherited from interface com.silverpeas.personalization.service.PersonalizationService
DEFAULT_LOOK, DEFAULT_MENU_DISPLAY_MODE
 
Constructor Summary
PersonalizationServiceMockWrapper()
           
 
Method Summary
 PersonalizationService getPersonalizationServiceMock()
           
 UserPreferences getUserSettings(String userId)
           
 void resetDefaultSpace(String spaceId)
           
 void saveUserSettings(UserPreferences userPreferences)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersonalizationServiceMockWrapper

public PersonalizationServiceMockWrapper()
Method Detail

getPersonalizationServiceMock

public PersonalizationService getPersonalizationServiceMock()

saveUserSettings

public void saveUserSettings(UserPreferences userPreferences)
Specified by:
saveUserSettings in interface PersonalizationService

getUserSettings

public UserPreferences getUserSettings(String userId)
Specified by:
getUserSettings in interface PersonalizationService

resetDefaultSpace

public void resetDefaultSpace(String spaceId)
Specified by:
resetDefaultSpace in interface PersonalizationService


Copyright © 2016 Silverpeas. All Rights Reserved.