com.silverpeas.profile.web
Class UserGroupProfileResourceTest

java.lang.Object
  extended by com.sun.jersey.test.framework.JerseyTest
      extended by com.silverpeas.web.RESTWebServiceTest<T>
          extended by com.silverpeas.web.ResourceGettingTest<UserProfileTestResources>
              extended by com.silverpeas.profile.web.UserGroupProfileResourceTest
All Implemented Interfaces:
WebResourceTesting

public class UserGroupProfileResourceTest
extends ResourceGettingTest<UserProfileTestResources>

Unit tests on the operations published by the UserGroupProfileResource REST service.


Field Summary
 
Fields inherited from class com.silverpeas.web.RESTWebServiceTest
CONTEXT_NAME
 
Fields inherited from interface com.silverpeas.web.WebResourceTesting
HTTP_SESSIONKEY
 
Constructor Summary
UserGroupProfileResourceTest()
           
 
Method Summary
 String anUnexistingResourceURI()
           
<T> T
aResource()
           
 String aResourceURI()
           
 void getAGivenAccessibleGroupOnlyInItsOwnDomainWithFullDomainIsolation()
          With full domain isolation, a user can access only a user group of its own domain.
 void getAGivenAccessibleGroupWhateverTheDomainWhenInSilverpeasDomainAndWithSemiDomainIsolation()
          With a semi domain isolation, only a user in the Silverpeas domain can access a user group of another domain.
 void getAGivenAccessibleGroupWhateverTheDomainWithNoDomainIsolation()
          With no domain isolation, a user can access a given user group, whatever the domain.
 void getAGivenUnaccessibleGroupInAnotherDomainWithFullDomainIsolation()
          With full domain isolation, a user cannot access a user group of another domain.
 void getAGivenUnaccessibleGroupInAnotherDomainWithSemiDomainIsolation()
          With semi domain isolation, a user that is not in the Silverpeas domain cannot access a user group of another domain.
 void getAGroupByItsName()
          A user can access a user group by its name.
 void getAGroupByTheFirstCharactersOfItsName()
          A user can access a user group by a pattern on its name.
 void getAllGroupsInItsOwnDomainWhenInSilverpeasDomainAndWithFullDomainIsolation()
          With a full domain isolation, a user in the Silverpeas domain can see only the user groups of its own domain.
 void getAllRootGroupsInItsOwnDomainWithFullDomainIsolation()
          With a full domain isolation, a user can see only the user groups of its own domain.
 void getAllRootGroupsInItsOwnsDomainWithSemiDomainIsolation()
          With a semi domain isolation, a user can see only the user groups of its own domain.
 void getAllRootGroupsWhateverTheDomainWhenInSilverpeasDomainAndWithSemiDomainIsolation()
          With a semi domain isolation, only a user in the Silverpeas domain can see the user groups of another domain.
 void getAllRootGroupsWhateverTheDomainWithNoDomainIsolation()
          With no domain isolation, a user can see the user groups of another domain.
 String[] getExistingComponentInstances()
           
 String getSessionKey()
           
 void getTheSubGroupsOfAGivenAccessibleGroupOnlyInItsOwnDomainWithFullDomainIsolation()
          With full isolation domain, a user can access the subgroups of a user group of its own domain.
 void getTheSubGroupsOfAGivenAccessibleGroupOnlyInItsOwnDomainWithSemiDomainIsolation()
          With semi isolation domain, a user can access the subgroups of a user group of its own domain.
 void getTheSubGroupsOfAGivenAccessibleGroupWhateverTheDomainWithNoDomainIsolation()
          With no isolation domain, a user can access the subgroups of a user group whatever their domain.
 void getTheSubGroupsOfAGivenUnaccessibleGroupInAnotherDomain()
          With full domain isolation, a user cannot access the subgroups of a group in another domain.
 void getTheSubGroupsOfAGivenUnaccessibleGroupInAnotherDomainWithSemiDomainIsolation()
          With semi domain isolation, a user, not in the Silverpeas domain, cannot access the subgroups of a group in another domain.
 void gettingAnUnexistingResource()
           
 void gettingAResourceByAnUnauthorizedUser()
           
 Class<UserGroupProfileEntity[]> getWebEntityClass()
           
 void prepareTestResources()
           
 
Methods inherited from class com.silverpeas.web.ResourceGettingTest
asMediaType, getAt, getAt, gettingAResourceByANonAuthenticatedUser, gettingAResourceWithAnExpiredSession, withAsSessionKey
 
Methods inherited from class com.silverpeas.web.RESTWebServiceTest
addComponentInstance, addTool, aUser, authenticate, buildQueryParametersFrom, denieAuthorizationToUsers, denieSpaceAuthorizationToUsers, getAccessControllerMock, getExistingTools, getMockedSpaceAccessController, getOrganizationControllerMock, getPersonalizationServiceMock, getTestResources, prepareMockedResources, resource, setComponentAccessibilityToUser
 
Methods inherited from class com.sun.jersey.test.framework.JerseyTest
client, configure, getBaseURI, getClient, getClientFactory, getPort, getTestContainerFactory, setClientFactory, setTestContainerFactory, setUp, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserGroupProfileResourceTest

public UserGroupProfileResourceTest()
Method Detail

prepareTestResources

public void prepareTestResources()

getAllRootGroupsWhateverTheDomainWithNoDomainIsolation

public void getAllRootGroupsWhateverTheDomainWithNoDomainIsolation()
With no domain isolation, a user can see the user groups of another domain.


getAllRootGroupsWhateverTheDomainWhenInSilverpeasDomainAndWithSemiDomainIsolation

public void getAllRootGroupsWhateverTheDomainWhenInSilverpeasDomainAndWithSemiDomainIsolation()
With a semi domain isolation, only a user in the Silverpeas domain can see the user groups of another domain.


getAllGroupsInItsOwnDomainWhenInSilverpeasDomainAndWithFullDomainIsolation

public void getAllGroupsInItsOwnDomainWhenInSilverpeasDomainAndWithFullDomainIsolation()
With a full domain isolation, a user in the Silverpeas domain can see only the user groups of its own domain.


getAllRootGroupsInItsOwnsDomainWithSemiDomainIsolation

public void getAllRootGroupsInItsOwnsDomainWithSemiDomainIsolation()
With a semi domain isolation, a user can see only the user groups of its own domain.


getAllRootGroupsInItsOwnDomainWithFullDomainIsolation

public void getAllRootGroupsInItsOwnDomainWithFullDomainIsolation()
With a full domain isolation, a user can see only the user groups of its own domain.


getAGivenAccessibleGroupWhateverTheDomainWithNoDomainIsolation

public void getAGivenAccessibleGroupWhateverTheDomainWithNoDomainIsolation()
With no domain isolation, a user can access a given user group, whatever the domain.


getAGivenAccessibleGroupWhateverTheDomainWhenInSilverpeasDomainAndWithSemiDomainIsolation

public void getAGivenAccessibleGroupWhateverTheDomainWhenInSilverpeasDomainAndWithSemiDomainIsolation()
With a semi domain isolation, only a user in the Silverpeas domain can access a user group of another domain.


getAGivenAccessibleGroupOnlyInItsOwnDomainWithFullDomainIsolation

public void getAGivenAccessibleGroupOnlyInItsOwnDomainWithFullDomainIsolation()
With full domain isolation, a user can access only a user group of its own domain.


getAGivenUnaccessibleGroupInAnotherDomainWithSemiDomainIsolation

public void getAGivenUnaccessibleGroupInAnotherDomainWithSemiDomainIsolation()
With semi domain isolation, a user that is not in the Silverpeas domain cannot access a user group of another domain.


getAGivenUnaccessibleGroupInAnotherDomainWithFullDomainIsolation

public void getAGivenUnaccessibleGroupInAnotherDomainWithFullDomainIsolation()
With full domain isolation, a user cannot access a user group of another domain.


getTheSubGroupsOfAGivenAccessibleGroupWhateverTheDomainWithNoDomainIsolation

public void getTheSubGroupsOfAGivenAccessibleGroupWhateverTheDomainWithNoDomainIsolation()
With no isolation domain, a user can access the subgroups of a user group whatever their domain.


getTheSubGroupsOfAGivenAccessibleGroupOnlyInItsOwnDomainWithSemiDomainIsolation

public void getTheSubGroupsOfAGivenAccessibleGroupOnlyInItsOwnDomainWithSemiDomainIsolation()
With semi isolation domain, a user can access the subgroups of a user group of its own domain.


getTheSubGroupsOfAGivenAccessibleGroupOnlyInItsOwnDomainWithFullDomainIsolation

public void getTheSubGroupsOfAGivenAccessibleGroupOnlyInItsOwnDomainWithFullDomainIsolation()
With full isolation domain, a user can access the subgroups of a user group of its own domain.


getTheSubGroupsOfAGivenUnaccessibleGroupInAnotherDomainWithSemiDomainIsolation

public void getTheSubGroupsOfAGivenUnaccessibleGroupInAnotherDomainWithSemiDomainIsolation()
With semi domain isolation, a user, not in the Silverpeas domain, cannot access the subgroups of a group in another domain.


getTheSubGroupsOfAGivenUnaccessibleGroupInAnotherDomain

public void getTheSubGroupsOfAGivenUnaccessibleGroupInAnotherDomain()
With full domain isolation, a user cannot access the subgroups of a group in another domain.


getAGroupByItsName

public void getAGroupByItsName()
A user can access a user group by its name.


getAGroupByTheFirstCharactersOfItsName

public void getAGroupByTheFirstCharactersOfItsName()
A user can access a user group by a pattern on its name.


gettingAResourceByAnUnauthorizedUser

public void gettingAResourceByAnUnauthorizedUser()
Overrides:
gettingAResourceByAnUnauthorizedUser in class ResourceGettingTest<UserProfileTestResources>

gettingAnUnexistingResource

public void gettingAnUnexistingResource()
Overrides:
gettingAnUnexistingResource in class ResourceGettingTest<UserProfileTestResources>

getExistingComponentInstances

public String[] getExistingComponentInstances()
Specified by:
getExistingComponentInstances in class RESTWebServiceTest<UserProfileTestResources>

aResourceURI

public String aResourceURI()

anUnexistingResourceURI

public String anUnexistingResourceURI()

aResource

public <T> T aResource()

getSessionKey

public String getSessionKey()

getWebEntityClass

public Class<UserGroupProfileEntity[]> getWebEntityClass()


Copyright © 2016 Silverpeas. All Rights Reserved.