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.BaseExoTestCase
Created by The eXo Platform SAS
- Author:
- : Pham Duy Dong dongpd@exoplatform.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.exoplatform.services.rest.impl.ResourceBinderprotected final Stringprotected org.exoplatform.container.PortalContainerprotected org.exoplatform.services.jcr.core.CredentialsImplprotected final Stringprotected static org.exoplatform.services.log.Logprotected org.exoplatform.services.organization.OrganizationServiceprotected org.exoplatform.services.rest.impl.ProviderBinderprotected final Stringprotected org.exoplatform.services.jcr.core.ManageableRepositoryprotected org.exoplatform.services.jcr.RepositoryServiceprotected org.exoplatform.services.rest.impl.RequestHandlerImplprotected javax.jcr.Sessionprotected org.exoplatform.services.jcr.ext.common.SessionProviderprotected org.exoplatform.services.jcr.ext.app.SessionProviderServiceprotected final StringFields inherited from class org.exoplatform.commons.testing.BaseExoTestCase
ownBootstrap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidApply a system sessionvoidapplyUserSession(String username, String password, String workspaceName) Apply an user session with a given user name, password and workspace nameprotected voidEnd current session<T> TgetService(Class<T> clazz) voidsetUp()voidtearDown()Methods 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
-
Field Details
-
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
- See Also:
-
DMSSYSTEM_WS
- See Also:
-
SYSTEM_WS
- See Also:
-
COLLABORATION_WS
- See Also:
-
-
Constructor Details
-
BaseECMSTestCase
public BaseECMSTestCase()
-
-
Method Details
-
setUp
- Overrides:
setUpin classjunit.framework.TestCase- Throws:
Exception
-
tearDown
- Overrides:
tearDownin classjunit.framework.TestCase- Throws:
Exception
-
getService
-
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
-