Package org.exoplatform.ecms.test
Class BaseECMSResourceTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.exoplatform.component.test.BaseGateInTest
org.exoplatform.component.test.AbstractGateInTest
org.exoplatform.component.test.AbstractKernelTest
org.exoplatform.commons.testing.BaseExoTestCase
org.exoplatform.ecms.test.BaseECMSTestCase
org.exoplatform.ecms.test.BaseECMSResourceTestCase
- All Implemented Interfaces:
junit.framework.Test
Created by The eXo Platform SAS
Author : Lai Trung Hieu
hieult@exoplatform.com
Jun 6, 2012
-
Field Summary
Fields inherited from class org.exoplatform.ecms.test.BaseECMSTestCase
binder, COLLABORATION_WS, container, credentials, DMSSYSTEM_WS, log, orgService, providers, REPO_NAME, repository, repositoryService, requestHandler, session, sessionProvider, sessionProviderService_, SYSTEM_WSFields inherited from class org.exoplatform.commons.testing.BaseExoTestCase
ownBootstrap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResource(Class<?> resourceClass, javax.ws.rs.core.MultivaluedMap<String, String> properties) Register supplied class as per-request root resource if it has valid JAX-RS annotations and no one resource with the same UriPattern already registered.voidaddResource(Object resource, javax.ws.rs.core.MultivaluedMap<String, String> properties) Register supplied Object as singleton root resource if it has valid JAX-RS annotations and no one resource with the same UriPattern already registered.voidremoveResource(Class clazz) Remove the resource instance of provided class from root resource container.org.exoplatform.services.rest.impl.ContainerResponseservice(String method, String requestURI, String baseURI, Map<String, List<String>> headers, byte[] data, org.exoplatform.services.rest.ContainerResponseWriter writer) Get response with provided writerorg.exoplatform.services.rest.impl.ContainerResponseservice(String method, String requestURI, String baseURI, javax.ws.rs.core.MultivaluedMap<String, String> headers, byte[] data) Get response without provided writerMethods inherited from class org.exoplatform.ecms.test.BaseECMSTestCase
applySystemSession, applyUserSession, endSession, getService, setUp, tearDownMethods inherited from class org.exoplatform.commons.testing.BaseExoTestCase
afterRunBare, beforeRunBare, getContainerMethods inherited from class org.exoplatform.component.test.AbstractKernelTest
afterClass, beforeClass, begin, end, isForceContainerReload, restartTransaction, setForceContainerReloadMethods inherited from class org.exoplatform.component.test.AbstractGateInTest
runBareMethods inherited from class org.exoplatform.component.test.BaseGateInTest
assertInstanceOf, fail, fail, failure, failureMethods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, toString
-
Constructor Details
-
BaseECMSResourceTestCase
public BaseECMSResourceTestCase()
-
-
Method Details
-
service
public org.exoplatform.services.rest.impl.ContainerResponse service(String method, String requestURI, String baseURI, Map<String, List<String>> headers, byte[] data, org.exoplatform.services.rest.ContainerResponseWriter writer) throws ExceptionGet response with provided writer- Parameters:
method-requestURI-baseURI-headers-data-writer-- Returns:
- Throws:
Exception
-
service
public org.exoplatform.services.rest.impl.ContainerResponse service(String method, String requestURI, String baseURI, javax.ws.rs.core.MultivaluedMap<String, String> headers, byte[] data) throws ExceptionGet response without provided writer- Parameters:
method-requestURI-baseURI-headers-data-- Returns:
- Throws:
Exception
-
addResource
public void addResource(Class<?> resourceClass, javax.ws.rs.core.MultivaluedMap<String, String> properties) Register supplied class as per-request root resource if it has valid JAX-RS annotations and no one resource with the same UriPattern already registered.- Parameters:
resourceClass- class of candidate to be root resourceproperties- optional resource properties. It may contains additional info about resource, e.g. description of resource, its responsibility, etc. This info can be retrievedObjectModel.getProperties(). This parameter may benull
-
addResource
Register supplied Object as singleton root resource if it has valid JAX-RS annotations and no one resource with the same UriPattern already registered.- Parameters:
resource- candidate to be root resourceproperties- optional resource properties. It may contains additional info about resource, e.g. description of resource, its responsibility, etc. This info can be retrievedObjectModel.getProperties(). This parameter may benull
-
removeResource
Remove the resource instance of provided class from root resource container.- Parameters:
clazz- the class of resource
-