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

    Fields
    Modifier and Type
    Field
    Description
    protected org.exoplatform.services.rest.impl.ResourceBinder
     
    protected final String
     
    protected org.exoplatform.container.PortalContainer
     
    protected org.exoplatform.services.jcr.core.CredentialsImpl
     
    protected final String
     
    protected static org.exoplatform.services.log.Log
     
    protected org.exoplatform.services.organization.OrganizationService
     
    protected org.exoplatform.services.rest.impl.ProviderBinder
     
    protected final String
     
    protected org.exoplatform.services.jcr.core.ManageableRepository
     
    protected org.exoplatform.services.jcr.RepositoryService
     
    protected org.exoplatform.services.rest.impl.RequestHandlerImpl
     
    protected javax.jcr.Session
     
    protected org.exoplatform.services.jcr.ext.common.SessionProvider
     
    protected org.exoplatform.services.jcr.ext.app.SessionProviderService
     
    protected final String
     

    Fields inherited from class org.exoplatform.commons.testing.BaseExoTestCase

    ownBootstrap
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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
    End current session
    <T> T
    getService(Class<T> clazz)
     
    void
     
    void
     

    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.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 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

      protected final String REPO_NAME
      See Also:
    • DMSSYSTEM_WS

      protected final String DMSSYSTEM_WS
      See Also:
    • SYSTEM_WS

      protected final String SYSTEM_WS
      See Also:
    • COLLABORATION_WS

      protected final String COLLABORATION_WS
      See Also:
  • Constructor Details

    • BaseECMSTestCase

      public BaseECMSTestCase()
  • Method Details

    • 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
    • endSession

      protected void endSession()
      End current session