com.silverpeas.socialnetwork.invitation.web
Class InvitationTestResources

java.lang.Object
  extended by com.silverpeas.web.TestResources
      extended by com.silverpeas.socialnetwork.invitation.web.InvitationTestResources
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Named(value="testRESTResources")
public class InvitationTestResources
extends TestResources

The resources to use in the test on the InvitationResource REST service. Theses objects manage in a single place all the resources required to perform correctly unit tests on the InvitationResource published operations.


Field Summary
static String JAVA_PACKAGE
           
static String SPRING_CONTEXT
           
 
Fields inherited from class com.silverpeas.web.TestResources
DEFAULT_DOMAIN, DEFAULT_LANGUAGE, TEST_RESOURCES_NAME, USER_ID_IN_TEST
 
Constructor Summary
InvitationTestResources()
           
 
Method Summary
 void initialize()
           
 InvitationEntity[] saveSomeReceivedInvitations(UserDetail user)
          Creates and saves some invitations coming from others users and received by the specified user.
 InvitationEntity[] saveSomeSentInvitations(UserDetail user)
          Creates and saves some invitations sent by the specified user to other ones.
 
Methods inherited from class com.silverpeas.web.TestResources
aUser, aUserNamed, getAccessControllerMock, getApplicationContext, getOrganizationControllerMock, getPersonalizationServiceMock, getSessionManagerMock, getSpaceAccessControllerMock, getTestResources, getTokenServiceMock, registerUser, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA_PACKAGE

public static final String JAVA_PACKAGE
See Also:
Constant Field Values

SPRING_CONTEXT

public static final String SPRING_CONTEXT
See Also:
Constant Field Values
Constructor Detail

InvitationTestResources

public InvitationTestResources()
Method Detail

initialize

@PostConstruct
public void initialize()

saveSomeReceivedInvitations

public InvitationEntity[] saveSomeReceivedInvitations(UserDetail user)
Creates and saves some invitations coming from others users and received by the specified user.

Parameters:
user - the user that has received the invitations.
Returns:
an array with the web representation of the invitations.

saveSomeSentInvitations

public InvitationEntity[] saveSomeSentInvitations(UserDetail user)
Creates and saves some invitations sent by the specified user to other ones.

Parameters:
user - the user that has sent the invitations.
Returns:
an array with the web representation of the invitations.


Copyright © 2016 Silverpeas. All Rights Reserved.