Class ResourceUpdateTest

  • All Implemented Interfaces:
    WebResourceTesting

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

      • ResourceUpdateTest

        public ResourceUpdateTest()
    • 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:
        the updated state of the resource
      • updateOfAResourceByANonAuthenticatedUser

        public void updateOfAResourceByANonAuthenticatedUser()
      • updateOfAResourceWithinADeprecatedSession

        public void updateOfAResourceWithinADeprecatedSession()
      • updateOfResourceByANonAuthorizedUser

        public void updateOfResourceByANonAuthorizedUser()
      • updateOfAResourceFromAnInvalidOne

        public void updateOfAResourceFromAnInvalidOne()
      • updateOfAnUnexistingResource

        public void updateOfAnUnexistingResource()
      • updateWithAnInvalidResourceState

        public void updateWithAnInvalidResourceState()