Package org.exoplatform.ecms.test
Class BaseECMSTestCase
- 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
-
- All Implemented Interfaces:
junit.framework.Test
- Direct Known Subclasses:
BaseECMSResourceTestCase
public abstract class BaseECMSTestCase extends org.exoplatform.commons.testing.BaseExoTestCaseCreated by The eXo Platform SAS- Author:
- : Pham Duy Dong dongpd@exoplatform.com
-
-
Field Summary
Fields Modifier and Type Field Description protected org.exoplatform.services.rest.impl.ResourceBinderbinderprotected StringCOLLABORATION_WSprotected org.exoplatform.container.PortalContainercontainerprotected org.exoplatform.services.jcr.core.CredentialsImplcredentialsprotected StringDMSSYSTEM_WSprotected static org.exoplatform.services.log.Loglogprotected org.exoplatform.services.organization.OrganizationServiceorgServiceprotected org.exoplatform.services.rest.impl.ProviderBinderprovidersprotected StringREPO_NAMEprotected org.exoplatform.services.jcr.core.ManageableRepositoryrepositoryprotected org.exoplatform.services.jcr.RepositoryServicerepositoryServiceprotected org.exoplatform.services.rest.impl.RequestHandlerImplrequestHandlerprotected javax.jcr.Sessionsessionprotected org.exoplatform.services.jcr.ext.common.SessionProvidersessionProviderprotected org.exoplatform.services.jcr.ext.app.SessionProviderServicesessionProviderService_protected StringSYSTEM_WS
-
Constructor Summary
Constructors Constructor Description BaseECMSTestCase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplySystemSession()Apply a system sessionvoidapplyUserSession(String username, String password, String workspaceName)Apply an user session with a given user name, password and workspace nameprotected voidendSession()End current session<T> TgetService(Class<T> clazz)voidsetUp()voidtearDown()-
Methods inherited from class org.exoplatform.commons.testing.BaseExoTestCase
afterRunBare, beforeRunBare, getContainer
-
Methods inherited from class org.exoplatform.component.test.AbstractKernelTest
afterClass, beforeClass, begin, end, isForceContainerReload, restartTransaction, setForceContainerReload
-
Methods inherited from class org.exoplatform.component.test.BaseGateInTest
assertInstanceOf, fail, fail, failure, failure
-
Methods 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
-
-
-
-
Field Detail
-
log
protected static org.exoplatform.services.log.Log log
-
container
protected org.exoplatform.container.PortalContainer container
-
providers
protected org.exoplatform.services.rest.impl.ProviderBinder providers
-
binder
protected org.exoplatform.services.rest.impl.ResourceBinder binder
-
requestHandler
protected org.exoplatform.services.rest.impl.RequestHandlerImpl requestHandler
-
orgService
protected org.exoplatform.services.organization.OrganizationService orgService
-
credentials
protected org.exoplatform.services.jcr.core.CredentialsImpl credentials
-
repositoryService
protected org.exoplatform.services.jcr.RepositoryService repositoryService
-
sessionProvider
protected org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider
-
session
protected javax.jcr.Session session
-
repository
protected org.exoplatform.services.jcr.core.ManageableRepository repository
-
sessionProviderService_
protected org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService_
-
REPO_NAME
protected final String REPO_NAME
- See Also:
- Constant Field Values
-
DMSSYSTEM_WS
protected final String DMSSYSTEM_WS
- See Also:
- Constant Field Values
-
SYSTEM_WS
protected final String SYSTEM_WS
- See Also:
- Constant Field Values
-
COLLABORATION_WS
protected final String COLLABORATION_WS
- See Also:
- Constant Field Values
-
-
Method Detail
-
setUp
public void setUp() throws Exception- Overrides:
setUpin classjunit.framework.TestCase- Throws:
Exception
-
tearDown
public void tearDown() throws Exception- Overrides:
tearDownin classjunit.framework.TestCase- Throws:
Exception
-
getService
public <T> T getService(Class<T> clazz)
-
applySystemSession
public void applySystemSession() throws org.exoplatform.services.jcr.config.RepositoryConfigurationException, javax.jcr.RepositoryExceptionApply a system session- Throws:
org.exoplatform.services.jcr.config.RepositoryConfigurationExceptionjavax.jcr.RepositoryException
-
applyUserSession
public void applyUserSession(String username, String password, String workspaceName) throws org.exoplatform.services.jcr.config.RepositoryConfigurationException, javax.jcr.RepositoryException
Apply an user session with a given user name, password and workspace name- Parameters:
username- name of userpassword- password of userworkspaceName- workspace name- Throws:
org.exoplatform.services.jcr.config.RepositoryConfigurationExceptionjavax.jcr.RepositoryException
-
endSession
protected void endSession()
End current session
-
-