org.exoplatform.ecms.test
Class BaseECMSTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.exoplatform.component.test.BaseGateInTest
              extended by org.exoplatform.component.test.AbstractGateInTest
                  extended by org.exoplatform.component.test.AbstractKernelTest
                      extended by org.exoplatform.commons.testing.BaseExoTestCase
                          extended by 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
protected  org.exoplatform.services.rest.impl.ResourceBinder binder
           
protected  String COLLABORATION_WS
           
protected  org.exoplatform.container.PortalContainer container
           
protected  org.exoplatform.services.jcr.core.CredentialsImpl credentials
           
protected  String DMSSYSTEM_WS
           
protected static org.exoplatform.services.log.Log log
           
protected  org.exoplatform.services.organization.OrganizationService orgService
           
protected  org.exoplatform.services.rest.impl.ProviderBinder providers
           
protected  String REPO_NAME
           
protected  org.exoplatform.services.jcr.core.ManageableRepository repository
           
protected  org.exoplatform.services.jcr.RepositoryService repositoryService
           
protected  org.exoplatform.services.rest.impl.RequestHandlerImpl requestHandler
           
protected  javax.jcr.Session session
           
protected  org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider
           
protected  org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService_
           
protected  String SYSTEM_WS
           
 
Fields inherited from class org.exoplatform.commons.testing.BaseExoTestCase
ownBootstrap
 
Constructor Summary
BaseECMSTestCase()
           
 
Method Summary
 void applySystemSession()
          Apply a system session
 void applyUserSession(String username, String password, String workspaceName)
          Apply an user session with a given user name, password and workspace name
protected  void endSession()
          End current session
<T> T
getService(Class<T> clazz)
           
 void setUp()
           
 void tearDown()
           
 
Methods inherited from class org.exoplatform.commons.testing.BaseExoTestCase
afterRunBare, beforeRunBare, getContainer
 
Methods inherited from class org.exoplatform.component.test.AbstractKernelTest
begin, end
 
Methods inherited from class org.exoplatform.component.test.AbstractGateInTest
runBare
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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
Constructor Detail

BaseECMSTestCase

public BaseECMSTestCase()
Method Detail

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Overrides:
tearDown in class junit.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.RepositoryException
Apply a system session

Throws:
org.exoplatform.services.jcr.config.RepositoryConfigurationException
javax.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 user
password - password of user
workspaceName - workspace name
Throws:
org.exoplatform.services.jcr.config.RepositoryConfigurationException
javax.jcr.RepositoryException
Exception

endSession

protected void endSession()
End current session



Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.