Package org.silverpeas.web.test
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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
getAPITokenValue()
Gets the valid API token value to use in tests.Class<?>
getWebEntityClass()
Gets the class of the web entities handled by the REST web service to test.
-
-
-
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.
-
getAPITokenValue
String getAPITokenValue()
Gets the valid API token value to use in tests. To be authorize to consume the REST API in the tests, the user must pass its API token through a bearer authorization scheme.- Returns:
- a valid API user token 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.
-
-