Class ResourceDeletionTest

  • All Implemented Interfaces:
    WebResourceTesting

    public abstract class ResourceDeletionTest
    extends RESTWebServiceTest
    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, ...)
    • Constructor Detail

      • ResourceDeletionTest

        public ResourceDeletionTest()
    • Method Detail

      • deleteAt

        public javax.ws.rs.core.Response deleteAt​(String uri)
        Requests a deleting 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.
        Returns:
        the Response of the deletion.
      • deleteAt

        public javax.ws.rs.core.Response deleteAt​(String uri,
                                                  AuthId authId)
        Requests a deletion 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.
        Returns:
        the Response of the deletion.
      • deleteAt

        public <C> C deleteAt​(String uri,
                              Class<C> c)
        Requests a deletion 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()
      • deletionOfAResourceWithADeprecatedSession

        public void deletionOfAResourceWithADeprecatedSession()
      • deletionOfAResourceByANonAuthorizedUser

        public void deletionOfAResourceByANonAuthorizedUser()
      • deletionOfAnUnexistingResource

        public void deletionOfAnUnexistingResource()