org.apache.chemistry.opencmis.tck.impl
Class AbstractSessionTest

java.lang.Object
  extended by org.apache.chemistry.opencmis.tck.impl.AbstractCmisTest
      extended by org.apache.chemistry.opencmis.tck.impl.AbstractSessionTest
All Implemented Interfaces:
CmisTest
Direct Known Subclasses:
CreateAndDeleteFolderTest, RepositoryInfoTest, RootFolderTest, SecurityTest, TypesTest

public abstract class AbstractSessionTest
extends AbstractCmisTest

Base class for tests that require an OpenCMIS session.


Nested Class Summary
 class AbstractSessionTest.CmisPropertyDefintion
           
 
Field Summary
static OperationContext SELECT_ALL_NO_CACHE_OC
           
 
Constructor Summary
AbstractSessionTest()
           
 
Method Summary
protected  void addResult(List<CmisTestResult> results, CmisTestResult result)
           
protected  CmisTestResult assertAllowableAction(CmisObject object, Action action, CmisTestResult success, CmisTestResult failure)
           
protected  CmisTestResult assertEquals(PropertyDefinition<?> expected, PropertyDefinition<?> actual, CmisTestResult success, CmisTestResult failure)
           
protected  CmisTestResult assertEquals(TypeDefinition expected, TypeDefinition actual, CmisTestResult success, CmisTestResult failure)
           
protected  CmisTestResult assertNotAllowableAction(CmisObject object, Action action, CmisTestResult success, CmisTestResult failure)
           
protected  CmisTestResult assertShallowEquals(CmisObject expected, CmisObject actual, CmisTestResult success, CmisTestResult failure)
           
protected  CmisTestResult checkChildren(Session session, Folder folder, String message)
           
protected  CmisTestResult checkObject(CmisObject object, String[] properties, String message)
           
protected  CmisTestResult checkProperty(Property<?> property, String message, PropertyCheckEnum propertyCheck)
           
protected  CmisTestResult checkPropertyDefinition(PropertyDefinition<?> propDef, String message)
           
protected  CmisTestResult checkTypeDefinition(Session session, TypeDefinition type, String message)
           
protected  Folder createFolder(Folder parent, String name)
          Creates a folder.
protected  Folder createFolder(Folder parent, String name, String objectTypeId)
          Creates a folder.
protected  Folder createTestFolder(Session session)
          Creates a test folder.
protected  void deleteObject(CmisObject object)
          Deletes an object and checks if it is deleted.
protected  void deleteTestFolder()
          Delete the test folder.
protected  boolean exists(CmisObject object)
          Tests if an object exists by refreshing it.
 BindingType getBinding()
           
 String getName()
          Returns the name of the test.
protected  RepositoryInfo getRepositoryInfo(Session session)
           
protected  Folder getTestFolder()
          Get the test folder.
protected  CmisTestResultStatus getWorst(List<CmisTestResult> results)
           
protected  boolean isGetDescendantsSupported(Session session)
           
protected  boolean isGetFolderTreeSupported(Session session)
           
 void run()
          Runs the test.
abstract  void run(Session session)
           
 
Methods inherited from class org.apache.chemistry.opencmis.tck.impl.AbstractCmisTest
addResult, addResultChild, assertContains, assertEqualLists, assertEquals, assertIsFalse, assertIsTrue, assertListNotEmpty, assertNotNull, assertNull, assertStringNotEmpty, createInfoResult, createResult, createResult, createResult, getGroup, getParameters, getResults, getStackTrace, getTime, init, isEnabled, isEqual, junit, setEnabled, setGroup, setName, setTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECT_ALL_NO_CACHE_OC

public static final OperationContext SELECT_ALL_NO_CACHE_OC
Constructor Detail

AbstractSessionTest

public AbstractSessionTest()
Method Detail

getBinding

public BindingType getBinding()

getName

public String getName()
Description copied from interface: CmisTest
Returns the name of the test.

Specified by:
getName in interface CmisTest
Overrides:
getName in class AbstractCmisTest

run

public void run()
         throws Exception
Description copied from interface: CmisTest
Runs the test.

Specified by:
run in interface CmisTest
Specified by:
run in class AbstractCmisTest
Throws:
Exception

run

public abstract void run(Session session)
                  throws Exception
Throws:
Exception

getRepositoryInfo

protected RepositoryInfo getRepositoryInfo(Session session)

createFolder

protected Folder createFolder(Folder parent,
                              String name)
Creates a folder.


createFolder

protected Folder createFolder(Folder parent,
                              String name,
                              String objectTypeId)
Creates a folder.


deleteObject

protected void deleteObject(CmisObject object)
Deletes an object and checks if it is deleted.


exists

protected boolean exists(CmisObject object)
Tests if an object exists by refreshing it.


createTestFolder

protected Folder createTestFolder(Session session)
Creates a test folder.


getTestFolder

protected Folder getTestFolder()
Get the test folder.


deleteTestFolder

protected void deleteTestFolder()
Delete the test folder.


isGetDescendantsSupported

protected boolean isGetDescendantsSupported(Session session)

isGetFolderTreeSupported

protected boolean isGetFolderTreeSupported(Session session)

checkObject

protected CmisTestResult checkObject(CmisObject object,
                                     String[] properties,
                                     String message)

assertAllowableAction

protected CmisTestResult assertAllowableAction(CmisObject object,
                                               Action action,
                                               CmisTestResult success,
                                               CmisTestResult failure)

assertNotAllowableAction

protected CmisTestResult assertNotAllowableAction(CmisObject object,
                                                  Action action,
                                                  CmisTestResult success,
                                                  CmisTestResult failure)

checkProperty

protected CmisTestResult checkProperty(Property<?> property,
                                       String message,
                                       PropertyCheckEnum propertyCheck)

checkChildren

protected CmisTestResult checkChildren(Session session,
                                       Folder folder,
                                       String message)

assertShallowEquals

protected CmisTestResult assertShallowEquals(CmisObject expected,
                                             CmisObject actual,
                                             CmisTestResult success,
                                             CmisTestResult failure)

checkTypeDefinition

protected CmisTestResult checkTypeDefinition(Session session,
                                             TypeDefinition type,
                                             String message)

checkPropertyDefinition

protected CmisTestResult checkPropertyDefinition(PropertyDefinition<?> propDef,
                                                 String message)

assertEquals

protected CmisTestResult assertEquals(TypeDefinition expected,
                                      TypeDefinition actual,
                                      CmisTestResult success,
                                      CmisTestResult failure)

assertEquals

protected CmisTestResult assertEquals(PropertyDefinition<?> expected,
                                      PropertyDefinition<?> actual,
                                      CmisTestResult success,
                                      CmisTestResult failure)

addResult

protected void addResult(List<CmisTestResult> results,
                         CmisTestResult result)

getWorst

protected CmisTestResultStatus getWorst(List<CmisTestResult> results)


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.