com.silverpeas.web
Class ResourceCreationTest<T extends TestResources>
java.lang.Object
com.sun.jersey.test.framework.JerseyTest
com.silverpeas.web.RESTWebServiceTest<T>
com.silverpeas.web.ResourceCreationTest<T>
- All Implemented Interfaces:
- WebResourceTesting
public abstract class ResourceCreationTest<T extends TestResources>
- extends RESTWebServiceTest<T>
- implements WebResourceTesting
Unit tests on the creation of a new 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, ...)
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 |
ResourceCreationTest
public ResourceCreationTest(String webServicePackage,
String springContext)
- See Also:
RESTWebServiceTest.RESTWebServiceTest(java.lang.String, java.lang.String)
at
public static String at(String uri)
- A convenient method to improve the readability of the method calls.
- Parameters:
uri
- a resource URI.
- Returns:
- the specified resource URI.
post
public <C> com.sun.jersey.api.client.ClientResponse post(C entity,
String atURI)
- Posts the specified web entity at the specified URI.
- Type Parameters:
C
- the type of the web entity to post.- Parameters:
entity
- the web entity to post.atURI
- the URI at which the entity has to be posted.
- Returns:
- the response of the post.
creationOfANewResourceByANonAuthenticatedUser
public void creationOfANewResourceByANonAuthenticatedUser()
creationOfANewResourceWithADeprecatedSession
public void creationOfANewResourceWithADeprecatedSession()
creationOfANewResourceByANonAuthorizedUser
public void creationOfANewResourceByANonAuthorizedUser()
postAnInvalidResourceState
public void postAnInvalidResourceState()
Copyright © 2016 Silverpeas. All Rights Reserved.