Package org.silverpeas.web.test
Class ResourceUpdateTest
- java.lang.Object
-
- org.silverpeas.web.test.RESTWebServiceTest
-
- org.silverpeas.web.test.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, ...)
-
-
Field Summary
-
Fields inherited from class org.silverpeas.web.test.RESTWebServiceTest
dbSetupRule
-
-
Constructor Summary
Constructors Constructor Description ResourceUpdateTest()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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 org.silverpeas.web.test.RESTWebServiceTest
applyQueryParameters, authenticate, denyAuthorizationToUsers, denySpaceAuthorizationToUsers, getBaseURI, getDataSetScript, getExistingComponentInstances, getExistingTools, getSilverpeasEnvironmentTest, getTableCreationScript, getTokenKeyOf, getWebResourceBaseURIBuilder, reloadAdminCaches, resource, setUpHTTPRequest, setUserIdent, withAsAuthId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.web.test.WebResourceTesting
anUnexistingResourceURI, aResource, aResourceURI, getAPITokenValue, getWebEntityClass
-
-
-
-
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()
-
-