com.silverpeas.web
Class ResourceUpdateTest<T extends TestResources>

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

public abstract class ResourceUpdateTest<T extends TestResources>
extends RESTWebServiceTest<T>
implements WebResourceTesting

Unit tests on the update of a resource in Silverpeas through a REST web service. This class is an abstract one and it implements some tests that are redondant over all web resources in Silverpeas (about authorization failure, authentication failure, ...)


Field Summary
 
Fields inherited from class com.silverpeas.web.RESTWebServiceTest
CONTEXT_NAME
 
Fields inherited from interface com.silverpeas.web.WebResourceTesting
HTTP_SESSIONKEY
 
Constructor Summary
ResourceUpdateTest(String webServicePackage, String springContext)
           
 
Method Summary
abstract
<I> I
anInvalidResource()
           
<C> C
putAt(String uri, C newResourceState)
          Puts at the specified URI the specified new state of the resource.
 void updateOfAnUnexistingResource()
           
 void updateOfAResourceByANonAuthenticatedUser()
           
 void updateOfAResourceFromAnInvalidOne()
           
 void updateOfAResourceWithinADeprecatedSession()
           
 void updateOfResourceByANonAuthorizedUser()
           
 void updateWithAnInvalidResourceState()
           
 
Methods inherited from class com.silverpeas.web.RESTWebServiceTest
addComponentInstance, addTool, aUser, authenticate, buildQueryParametersFrom, denieAuthorizationToUsers, denieSpaceAuthorizationToUsers, getAccessControllerMock, getExistingComponentInstances, 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
 
Methods inherited from interface com.silverpeas.web.WebResourceTesting
anUnexistingResourceURI, aResource, aResourceURI, getSessionKey, getWebEntityClass
 

Constructor Detail

ResourceUpdateTest

public ResourceUpdateTest(String webServicePackage,
                          String springContext)
See Also:
RESTWebServiceTest.RESTWebServiceTest(java.lang.String, java.lang.String)
Method Detail

anInvalidResource

public abstract <I> I anInvalidResource()

putAt

public <C> C putAt(String uri,
                   C newResourceState)
Puts at the specified URI the specified new state of the resource.

Type Parameters:
C - the type of the resource's state.
Parameters:
uri - the URI at which the resource is.
newResourceState - the new state of the resource.
Returns:

updateOfAResourceByANonAuthenticatedUser

public void updateOfAResourceByANonAuthenticatedUser()

updateOfAResourceWithinADeprecatedSession

public void updateOfAResourceWithinADeprecatedSession()

updateOfResourceByANonAuthorizedUser

public void updateOfResourceByANonAuthorizedUser()

updateOfAResourceFromAnInvalidOne

public void updateOfAResourceFromAnInvalidOne()

updateOfAnUnexistingResource

public void updateOfAnUnexistingResource()

updateWithAnInvalidResourceState

public void updateWithAnInvalidResourceState()


Copyright © 2016 Silverpeas. All Rights Reserved.