com.silverpeas.web
Class ResourceDeletionTest<T extends TestResources>
java.lang.Object
com.sun.jersey.test.framework.JerseyTest
com.silverpeas.web.RESTWebServiceTest<T>
com.silverpeas.web.ResourceDeletionTest<T>
- All Implemented Interfaces:
- WebResourceTesting
public abstract class ResourceDeletionTest<T extends TestResources>
- extends RESTWebServiceTest<T>
- implements WebResourceTesting
Unit tests on the deletion 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, ...)
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 |
ResourceDeletionTest
public ResourceDeletionTest(String webServicePackage,
String springContext)
- See Also:
RESTWebServiceTest.RESTWebServiceTest(java.lang.String, java.lang.String)
deleteAt
public void deleteAt(String uri)
- Requests a delete of the web resource identified at the specified URI.
If an error occurs, then an UniformInterfaceException exception is thrown.
- Parameters:
uri
- the uri of the resource to delete.
deleteAt
public <C> C deleteAt(String uri,
Class<C> c)
- Requests a delete of the web resource identified at the specified URI.
If an error occurs, then an UniformInterfaceException exception is thrown.
- Parameters:
c
- the class of which the returned resource should be an instance.uri
- the uri of the resource to delete.
- Returns:
- the web entity.
deletionOfAResourceByANonAuthenticatedUser
public void deletionOfAResourceByANonAuthenticatedUser()
throws Exception
- Throws:
Exception
deletionOfAResourceWithADeprecatedSession
public void deletionOfAResourceWithADeprecatedSession()
throws Exception
- Throws:
Exception
deletionOfAResourceByANonAuthorizedUser
public void deletionOfAResourceByANonAuthorizedUser()
throws Exception
- Throws:
Exception
deletionOfAnUnexistingResource
public void deletionOfAnUnexistingResource()
throws Exception
- Throws:
Exception
Copyright © 2016 Silverpeas. All Rights Reserved.