public abstract class AbstractSessionTest extends AbstractCmisTest
Modifier and Type | Class and Description |
---|---|
class |
AbstractSessionTest.CmisPropertyDefintion |
Modifier and Type | Field and Description |
---|---|
static OperationContext |
SELECT_ALL_NO_CACHE_OC |
static OperationContext |
SELECT_ALL_NO_CACHE_OC_ORDER_BY_NAME |
Constructor and Description |
---|
AbstractSessionTest() |
Modifier and Type | Method and Description |
---|---|
protected void |
addResult(List<CmisTestResult> results,
CmisTestResult result) |
protected CmisTestResult |
assertAllowableAction(CmisObject object,
Action action,
CmisTestResult success,
CmisTestResult failure) |
protected CmisTestResult |
assertEqualAceLists(List<Ace> expected,
List<Ace> actual,
CmisTestResult success,
CmisTestResult failure) |
protected CmisTestResult |
assertEqualObjectList(List<? extends CmisObject> expected,
List<? extends CmisObject> actual,
CmisTestResult success,
CmisTestResult failure) |
protected CmisTestResult |
assertEqualRenditionLists(List<Rendition> expected,
List<Rendition> actual,
CmisTestResult success,
CmisTestResult failure) |
protected CmisTestResult |
assertEquals(Ace expected,
Ace actual,
CmisTestResult success,
CmisTestResult failure) |
protected CmisTestResult |
assertEquals(Acl expected,
Acl actual,
CmisTestResult success,
CmisTestResult failure) |
protected CmisTestResult |
assertEquals(AllowableActions expected,
AllowableActions actual,
CmisTestResult success,
CmisTestResult failure) |
protected CmisTestResult |
assertEquals(CmisObject expected,
CmisObject actual,
CmisTestResult success,
CmisTestResult failure,
boolean checkAcls,
boolean checkPolicies) |
protected CmisTestResult |
assertEquals(ContentStream expected,
ContentStream actual,
CmisTestResult success,
CmisTestResult failure) |
protected CmisTestResult |
assertEquals(Property<?> expected,
Property<?> actual,
CmisTestResult success,
CmisTestResult failure) |
protected CmisTestResult |
assertEquals(PropertyDefinition<?> expected,
PropertyDefinition<?> actual,
CmisTestResult success,
CmisTestResult failure) |
protected CmisTestResult |
assertEquals(Rendition expected,
Rendition 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 |
checkACL(Session session,
Acl acl,
String message) |
protected CmisTestResult |
checkChildren(Session session,
Folder folder,
String message) |
protected CmisTestResult |
checkObject(Session session,
CmisObject object,
String[] properties,
String message) |
protected CmisTestResult |
checkProperty(Property<?> property,
String message,
PropertyCheckEnum propertyCheck) |
protected CmisTestResult |
checkPropertyDefinition(PropertyDefinition<?> propDef,
String message) |
protected CmisTestResult |
checkRenditions(Session session,
CmisObject object,
String message) |
protected CmisTestResult |
checkTypeDefinition(Session session,
TypeDefinition type,
String message) |
protected CmisTestResult |
checkVersionHistory(Session session,
CmisObject object,
String[] properties,
String message) |
protected int |
countFolderChildren(Folder folder)
Counts the children in a folder.
|
protected Document |
createDocument(Session session,
Folder parent,
String name,
String content)
Creates a document.
|
protected Document |
createDocument(Session session,
Folder parent,
String name,
String objectTypeId,
String[] secondaryTypeIds,
String content)
Creates a document.
|
protected Folder |
createFolder(Session session,
Folder parent,
String name)
Creates a folder.
|
protected Folder |
createFolder(Session session,
Folder parent,
String name,
String objectTypeId)
Creates a folder.
|
protected Item |
createItem(Session session,
Folder parent,
String name)
Creates a item.
|
protected Item |
createItem(Session session,
Folder parent,
String name,
String objectTypeId)
Creates a item.
|
protected Relationship |
createRelationship(Session session,
String name,
ObjectId source,
ObjectId target)
Creates a relationship.
|
protected Relationship |
createRelationship(Session session,
String name,
ObjectId source,
ObjectId target,
String objectTypeId)
Creates a relationship.
|
protected Folder |
createTestFolder(Session session)
Creates a test folder.
|
protected ObjectType |
createType(Session session,
TypeDefinition typeDef)
Creates a new type.
|
protected void |
deleteObject(CmisObject object)
Deletes an object and checks if it is deleted.
|
protected void |
deleteTestFolder()
Delete the test folder.
|
protected void |
deleteType(Session session,
String typeId)
Deletes a type.
|
protected boolean |
exists(CmisObject object)
Tests if an object exists by refreshing it.
|
protected String[] |
getAllProperties(CmisObject object) |
BindingType |
getBinding() |
protected String |
getDocumentTestTypeId() |
protected String |
getFolderTestTypeId() |
protected String |
getItemTestTypeId() |
String |
getName()
Returns the name of the test.
|
protected RepositoryInfo |
getRepositoryInfo(Session session) |
protected String |
getSecondaryTestTypeId() |
protected String |
getStringFromContentStream(ContentStream contentStream) |
protected Folder |
getTestFolder()
Get the test folder.
|
protected CmisTestResultStatus |
getWorst(List<CmisTestResult> results) |
protected boolean |
hasItems(Session session) |
protected boolean |
hasPolicies(Session session) |
protected boolean |
hasRelationships(Session session) |
protected boolean |
hasSecondaries(Session session) |
protected boolean |
isGetDescendantsSupported(Session session) |
protected boolean |
isGetFolderTreeSupported(Session session) |
void |
run()
Runs the test.
|
abstract void |
run(Session session) |
addResult, addResultChild, assertContains, assertEqualLists, assertEquals, assertEqualSet, assertIsFalse, assertIsTrue, assertListNotEmpty, assertNotNull, assertNull, assertStringNotEmpty, assertStringNullOrEmpty, createInfoResult, createResult, createResult, createResult, formatValue, getDescription, getGroup, getParameters, getResults, getStackTrace, getTime, init, isEnabled, isEqual, junit, setDescription, setEnabled, setGroup, setName, setTime
public static final OperationContext SELECT_ALL_NO_CACHE_OC
public static final OperationContext SELECT_ALL_NO_CACHE_OC_ORDER_BY_NAME
public BindingType getBinding()
public String getName()
CmisTest
getName
in interface CmisTest
getName
in class AbstractCmisTest
public void run() throws Exception
CmisTest
run
in interface CmisTest
run
in class AbstractCmisTest
Exception
protected RepositoryInfo getRepositoryInfo(Session session)
protected String getFolderTestTypeId()
protected String getDocumentTestTypeId()
protected String getItemTestTypeId()
protected String getSecondaryTestTypeId()
protected String[] getAllProperties(CmisObject object)
protected String getStringFromContentStream(ContentStream contentStream) throws IOException
IOException
protected Folder createFolder(Session session, Folder parent, String name)
protected Folder createFolder(Session session, Folder parent, String name, String objectTypeId)
protected int countFolderChildren(Folder folder)
protected Document createDocument(Session session, Folder parent, String name, String content)
protected Document createDocument(Session session, Folder parent, String name, String objectTypeId, String[] secondaryTypeIds, String content)
protected Relationship createRelationship(Session session, String name, ObjectId source, ObjectId target)
protected Relationship createRelationship(Session session, String name, ObjectId source, ObjectId target, String objectTypeId)
protected Item createItem(Session session, Folder parent, String name, String objectTypeId)
protected void deleteObject(CmisObject object)
protected boolean exists(CmisObject object)
protected ObjectType createType(Session session, TypeDefinition typeDef)
protected Folder getTestFolder()
protected void deleteTestFolder()
protected boolean isGetDescendantsSupported(Session session)
protected boolean isGetFolderTreeSupported(Session session)
protected boolean hasRelationships(Session session)
protected boolean hasPolicies(Session session)
protected boolean hasItems(Session session)
protected boolean hasSecondaries(Session session)
protected CmisTestResult checkObject(Session session, CmisObject object, String[] properties, String message)
protected CmisTestResult checkACL(Session session, Acl acl, String message)
protected CmisTestResult checkRenditions(Session session, CmisObject object, String message)
protected CmisTestResult checkVersionHistory(Session session, CmisObject object, String[] properties, String message)
protected CmisTestResult assertAllowableAction(CmisObject object, Action action, CmisTestResult success, CmisTestResult failure)
protected CmisTestResult assertNotAllowableAction(CmisObject object, Action action, CmisTestResult success, CmisTestResult failure)
protected CmisTestResult checkProperty(Property<?> property, String message, PropertyCheckEnum propertyCheck)
protected CmisTestResult checkChildren(Session session, Folder folder, String message)
protected CmisTestResult assertShallowEquals(CmisObject expected, CmisObject actual, CmisTestResult success, CmisTestResult failure)
protected CmisTestResult checkTypeDefinition(Session session, TypeDefinition type, String message)
protected CmisTestResult checkPropertyDefinition(PropertyDefinition<?> propDef, String message)
protected CmisTestResult assertEquals(TypeDefinition expected, TypeDefinition actual, CmisTestResult success, CmisTestResult failure)
protected CmisTestResult assertEquals(PropertyDefinition<?> expected, PropertyDefinition<?> actual, CmisTestResult success, CmisTestResult failure)
protected CmisTestResult assertEquals(CmisObject expected, CmisObject actual, CmisTestResult success, CmisTestResult failure, boolean checkAcls, boolean checkPolicies)
protected CmisTestResult assertEqualObjectList(List<? extends CmisObject> expected, List<? extends CmisObject> actual, CmisTestResult success, CmisTestResult failure)
protected CmisTestResult assertEquals(Property<?> expected, Property<?> actual, CmisTestResult success, CmisTestResult failure)
protected CmisTestResult assertEquals(AllowableActions expected, AllowableActions actual, CmisTestResult success, CmisTestResult failure)
protected CmisTestResult assertEquals(Acl expected, Acl actual, CmisTestResult success, CmisTestResult failure)
protected CmisTestResult assertEqualAceLists(List<Ace> expected, List<Ace> actual, CmisTestResult success, CmisTestResult failure)
protected CmisTestResult assertEquals(Ace expected, Ace actual, CmisTestResult success, CmisTestResult failure)
protected CmisTestResult assertEqualRenditionLists(List<Rendition> expected, List<Rendition> actual, CmisTestResult success, CmisTestResult failure)
protected CmisTestResult assertEquals(Rendition expected, Rendition actual, CmisTestResult success, CmisTestResult failure)
protected CmisTestResult assertEquals(ContentStream expected, ContentStream actual, CmisTestResult success, CmisTestResult failure)
protected void addResult(List<CmisTestResult> results, CmisTestResult result)
protected CmisTestResultStatus getWorst(List<CmisTestResult> results)
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.