com.silverpeas.profile.web
Class UserProfileResourceTest

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.UserProfileResourceTest
All Implemented Interfaces:
WebResourceTesting

public class UserProfileResourceTest
extends ResourceGettingTest<UserProfileTestResources>

Unit tests on the operations published by the UserProfileResource 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
UserProfileResourceTest()
           
 
Method Summary
 String anUnexistingResourceURI()
           
<T> T
aResource()
           
 String aResourceURI()
           
 void getAGivenUserInItsOwnsDomainWithFullDomainIsolation()
          Whatever the domain isolation applied, a users can see another one in its own user domain.
 void getAGivenUserInItsOwnsDomainWithNoDomainIsolation()
          Whatever the domain isolation applied, a users can see another one in its own user domain.
 void getAGivenUserInItsOwnsDomainWithSemiDomainIsolation()
          Whatever the domain isolation applied, a users can see another one in its own user domain.
 void getAGivenUserWhateverItsDomainWithNoDomainIsolation()
          With no domain isolation, a user can see another one whatever its user domain.
 void getAllUnaccessibleUsersWhateverTheDomainWhenInSilverpeasDomainAndWithFullDomainIsolation()
          With a full domain isolation, the users in the Silverpeas domain cannot see the users of others user domains.
 void getAllUsersInItsOwnsDomainWithFullDomainIsolation()
          Whatever the domain isolation applied, the users can see the others ones in their own user domain.
 void getAllUsersInItsOwnsDomainWithNoDomainIsolation()
          Whatever the domain isolation applied, the users can see the others ones in their own user domain.
 void getAllUsersInItsOwnsDomainWithSemiDomainIsolation()
          Whatever the domain isolation applied, the users can see the others ones in their own user domain.
 void getAllUsersOfAGivenGroupInItsOwnsDomainWithFullDomainIsolation()
          Whavers the domain isolation applied, a user can see all the users of a group when they are in its own domain.
 void getAllUsersOfAGivenGroupInItsOwnsDomainWithNoIsolationDomain()
          Whavers the domain isolation applied, a user can see all the users of a group when they are in its own domain.
 void getAllUsersOfAGivenGroupInItsOwnsDomainWithSemiDomainIsolation()
          Whavers the domain isolation applied, a user can see all the users of a group when they are in its own domain.
 void getAllUsersOfAGivenGroupWhateverTheDomainWhenInSilverpeasDomainAndWithSemiDomainIsolation()
          With a semi domain isolation, a user, whose the domain is the Silverpeas one, can see all the users of a group of another domain.
 void getAllUsersOfAnUnaccessibleGivenGroupWithFullDomainIsolation()
          With a full isolation level, a user cannot see all the users of a group when not in its own user domain.
 void getAllUsersOfAnUnaccessibleGivenGroupWithSemiDomainIsolation()
          With a semi isolation level, a user cannot see all the users of a group when not in its own user domain.
 void getAllUsersOfAnUnaccessibleGroupWhenInSilverpeasDomainAndWithFullDomainIsolation()
          With a full domain isolation, a user, whose the domain is the Silverpeas one, cannot see all the users of a group of another domain.
 void getAllUsersWhateverTheDomainWhenInSilverpeasDomainAndWithSemiDomainIsolation()
          With a semi domain isolation, the users in the Silverpeas domain can see the users whatever their user domain.
 void getAnUnaccessibleUserInAnotherDomainWithFullDomainIsolation()
          With a full domain isolation, a user whose the domain isn't the Silverpeas one cannot see a user of another domain.
 void getAnUnaccessibleUserInAnotherDomainWithSemiDomainIsolation()
          With a semi domain isolation, a user whose the domain isn't the Silverpeas one cannot see a user of another domain.
 void getAnUnaccessibleUserWhateverTheDomainWhenInSilverpeasDomainAndWhenInFullIsolation()
          With a full domain isolation, a user in the silverpeas domain cannot see another one of another domain.
 void getAUserByItsFirstName()
          A user can see another one by its first name.
 void getAUserByItsLastName()
          A user can see another one by its last name.
 void getAUserByTheFirstCharactersOfItsName()
          A user can see another ones by a pattern on their name.
 void getAUserInAGivenGroupByTheFirstCharactersOfItsName()
          A user can see another ones in a given group by a pattern on their name.
 void getAUserWhateverTheDomainWhenInSilverpeasDomainAndWhenInSemiIsolation()
          With a semi domain isolation, only a user in the silverpeas domain can see another one of another domain.
 String[] getExistingComponentInstances()
           
 String getSessionKey()
           
 void getTheContactsOfAGivenUser()
          A user can see the relationships of another one.
 void getTheCurrentUserInTheSession()
          A user can see its own profile without knowing its identifier.
 void gettingAllUsersOfAGivenGroupWhateverTheDomain()
          With no domain isolation, a user can see all users of a given group whatever their user domain.
 void gettingAllUsersWhateverTheDomainWithNoDomainIsolation()
          With no domain isolation, the users can see others ones whatever their user domain.
 void gettingAnUnexistingResource()
           
 void gettingAResourceByAnUnauthorizedUser()
           
 Class<UserProfileEntity[]> 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

UserProfileResourceTest

public UserProfileResourceTest()
Method Detail

prepareTestResources

public void prepareTestResources()

gettingAllUsersWhateverTheDomainWithNoDomainIsolation

public void gettingAllUsersWhateverTheDomainWithNoDomainIsolation()
With no domain isolation, the users can see others ones whatever their user domain.


getAllUsersInItsOwnsDomainWithNoDomainIsolation

public void getAllUsersInItsOwnsDomainWithNoDomainIsolation()
Whatever the domain isolation applied, the users can see the others ones in their own user domain. In this test, we validate this is the case with no domain isolation.


getAllUsersInItsOwnsDomainWithSemiDomainIsolation

public void getAllUsersInItsOwnsDomainWithSemiDomainIsolation()
Whatever the domain isolation applied, the users can see the others ones in their own user domain. In this test, we validate this is the case with a semi domain isolation.


getAllUsersInItsOwnsDomainWithFullDomainIsolation

public void getAllUsersInItsOwnsDomainWithFullDomainIsolation()
Whatever the domain isolation applied, the users can see the others ones in their own user domain. In this test, we validate this is the case with a full domain isolation.


getAllUsersWhateverTheDomainWhenInSilverpeasDomainAndWithSemiDomainIsolation

public void getAllUsersWhateverTheDomainWhenInSilverpeasDomainAndWithSemiDomainIsolation()
With a semi domain isolation, the users in the Silverpeas domain can see the users whatever their user domain.


getAllUnaccessibleUsersWhateverTheDomainWhenInSilverpeasDomainAndWithFullDomainIsolation

public void getAllUnaccessibleUsersWhateverTheDomainWhenInSilverpeasDomainAndWithFullDomainIsolation()
With a full domain isolation, the users in the Silverpeas domain cannot see the users of others user domains.


getAGivenUserWhateverItsDomainWithNoDomainIsolation

public void getAGivenUserWhateverItsDomainWithNoDomainIsolation()
With no domain isolation, a user can see another one whatever its user domain.


getAGivenUserInItsOwnsDomainWithNoDomainIsolation

public void getAGivenUserInItsOwnsDomainWithNoDomainIsolation()
Whatever the domain isolation applied, a users can see another one in its own user domain. In this test, we validate this is the case with no domain isolation.


getAGivenUserInItsOwnsDomainWithSemiDomainIsolation

public void getAGivenUserInItsOwnsDomainWithSemiDomainIsolation()
Whatever the domain isolation applied, a users can see another one in its own user domain. In this test, we validate this is the case with a semi domain isolation.


getAGivenUserInItsOwnsDomainWithFullDomainIsolation

public void getAGivenUserInItsOwnsDomainWithFullDomainIsolation()
Whatever the domain isolation applied, a users can see another one in its own user domain. In this test, we validate this is the case with full domain isolation.


getAUserWhateverTheDomainWhenInSilverpeasDomainAndWhenInSemiIsolation

public void getAUserWhateverTheDomainWhenInSilverpeasDomainAndWhenInSemiIsolation()
With a semi domain isolation, only a user in the silverpeas domain can see another one of another domain.


getAnUnaccessibleUserWhateverTheDomainWhenInSilverpeasDomainAndWhenInFullIsolation

public void getAnUnaccessibleUserWhateverTheDomainWhenInSilverpeasDomainAndWhenInFullIsolation()
With a full domain isolation, a user in the silverpeas domain cannot see another one of another domain.


getAnUnaccessibleUserInAnotherDomainWithSemiDomainIsolation

public void getAnUnaccessibleUserInAnotherDomainWithSemiDomainIsolation()
With a semi domain isolation, a user whose the domain isn't the Silverpeas one cannot see a user of another domain.


getAnUnaccessibleUserInAnotherDomainWithFullDomainIsolation

public void getAnUnaccessibleUserInAnotherDomainWithFullDomainIsolation()
With a full domain isolation, a user whose the domain isn't the Silverpeas one cannot see a user of another domain.


gettingAllUsersOfAGivenGroupWhateverTheDomain

public void gettingAllUsersOfAGivenGroupWhateverTheDomain()
With no domain isolation, a user can see all users of a given group whatever their user domain.


getAllUsersOfAGivenGroupInItsOwnsDomainWithNoIsolationDomain

public void getAllUsersOfAGivenGroupInItsOwnsDomainWithNoIsolationDomain()
Whavers the domain isolation applied, a user can see all the users of a group when they are in its own domain. This test validates this rule with no user domain isolation.


getAllUsersOfAGivenGroupInItsOwnsDomainWithSemiDomainIsolation

public void getAllUsersOfAGivenGroupInItsOwnsDomainWithSemiDomainIsolation()
Whavers the domain isolation applied, a user can see all the users of a group when they are in its own domain. This test validates this rule with a semi user domain isolation.


getAllUsersOfAGivenGroupInItsOwnsDomainWithFullDomainIsolation

public void getAllUsersOfAGivenGroupInItsOwnsDomainWithFullDomainIsolation()
Whavers the domain isolation applied, a user can see all the users of a group when they are in its own domain. This test validates this rule with a full user domain isolation.


getAllUsersOfAGivenGroupWhateverTheDomainWhenInSilverpeasDomainAndWithSemiDomainIsolation

public void getAllUsersOfAGivenGroupWhateverTheDomainWhenInSilverpeasDomainAndWithSemiDomainIsolation()
With a semi domain isolation, a user, whose the domain is the Silverpeas one, can see all the users of a group of another domain.


getAllUsersOfAnUnaccessibleGroupWhenInSilverpeasDomainAndWithFullDomainIsolation

public void getAllUsersOfAnUnaccessibleGroupWhenInSilverpeasDomainAndWithFullDomainIsolation()
With a full domain isolation, a user, whose the domain is the Silverpeas one, cannot see all the users of a group of another domain.


getAllUsersOfAnUnaccessibleGivenGroupWithSemiDomainIsolation

public void getAllUsersOfAnUnaccessibleGivenGroupWithSemiDomainIsolation()
With a semi isolation level, a user cannot see all the users of a group when not in its own user domain.


getAllUsersOfAnUnaccessibleGivenGroupWithFullDomainIsolation

public void getAllUsersOfAnUnaccessibleGivenGroupWithFullDomainIsolation()
With a full isolation level, a user cannot see all the users of a group when not in its own user domain.


getAUserByItsFirstName

public void getAUserByItsFirstName()
A user can see another one by its first name.


getAUserByItsLastName

public void getAUserByItsLastName()
A user can see another one by its last name.


getAUserByTheFirstCharactersOfItsName

public void getAUserByTheFirstCharactersOfItsName()
A user can see another ones by a pattern on their name.


getAUserInAGivenGroupByTheFirstCharactersOfItsName

public void getAUserInAGivenGroupByTheFirstCharactersOfItsName()
A user can see another ones in a given group by a pattern on their name.


getTheCurrentUserInTheSession

public void getTheCurrentUserInTheSession()
A user can see its own profile without knowing its identifier.


getTheContactsOfAGivenUser

public void getTheContactsOfAGivenUser()
A user can see the relationships of another one.


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<UserProfileEntity[]> getWebEntityClass()


Copyright © 2016 Silverpeas. All Rights Reserved.