com.silverpeas.web
Interface WebResourceTesting

All Known Implementing Classes:
ResourceCreationTest, ResourceDeletionTest, ResourceGettingTest, ResourceUpdateTest

public interface WebResourceTesting

Unit tests on the services provided by a web resource in Silverpeas. This interface defines the operations a unit test about web resources should implement.


Field Summary
static String HTTP_SESSIONKEY
          The HTTP header paremeter in an incoming request that carries the user session key as it is defined in the Silverpeas REST web service API.
 
Method Summary
 String anUnexistingResourceURI()
          Gets the URI of an invalid or an unexisting web resource.
<T> T
aResource()
          Gets a resource instance to use in tests.
 String aResourceURI()
          Gets the URI of a valid and existing web resource backed by a REST web service.
 String getSessionKey()
          Gets the valid session key to use in tests.
 Class<?> getWebEntityClass()
          Gets the class of the web entities handled by the REST web service to test.
 

Field Detail

HTTP_SESSIONKEY

static final String HTTP_SESSIONKEY
The HTTP header paremeter in an incoming request that carries the user session key as it is defined in the Silverpeas REST web service API.

See Also:
Constant Field Values
Method Detail

aResourceURI

String aResourceURI()
Gets the URI of a valid and existing web resource backed by a REST web service.

Returns:
the URI of a valid web resource.

anUnexistingResourceURI

String anUnexistingResourceURI()
Gets the URI of an invalid or an unexisting web resource. It should be an invalid URI (for example a resource refered in an unexisting component instance), and not necessary an invalid resource in a correct URI.

Returns:
the URI of an invalid or unexisting web resource.

aResource

<T> T aResource()
Gets a resource instance to use in tests.

Type Parameters:
T - the type of the resource.
Returns:
a resource.

getSessionKey

String getSessionKey()
Gets the valid session key to use in tests.

Returns:
a valid session key.

getWebEntityClass

Class<?> getWebEntityClass()
Gets the class of the web entities handled by the REST web service to test.

Returns:
the class of the web entities.


Copyright © 2016 Silverpeas. All Rights Reserved.