Package org.alfresco.utility.data
Class TestData<Data>
java.lang.Object
org.alfresco.utility.data.TestData<Data>
- All Implemented Interfaces:
DSL<Data>
- Direct Known Subclasses:
DataCalendarEvent,DataContent,DataEmail,DataGroup,DataLink,DataSite,DataUser,DataWiki,DataWorkflow
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected UserModelThis is the currentUser that we will use for creating specific test data If none specified we will use the admin user defined in default.propertiesstatic Stringstatic Stringprotected TasProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassertExtensionAmpExists(String moduleId) assertLogLineIs(String logLine) Returns Alfresco Content Services Home (Alfresco root) directory using JMX propertygets the current test userstatic booleanCheck ifpassed as parameter is a file or not based on extension voidsetCurrentSite(String currentSite) setCurrentSpace(String currentRepositorySpace) DSL.getSitesPath(), DSL.getUserHomesPath(),DSL.getDataDictionaryPath(), etc If nothing is specified, the root folder is usedvoidsetCurrentUser(UserModel testUser) voidsetLastNodeId(String lastNodeId) setLastResource(String lastResource) Set last resource with content protocol locationDefines the current user to be AdminusingLastServerLogLines(int lineNumber) usingResource(ContentModel model) Resource can be a folder, file where we want to create new content or make assertion.Defines the current test site to be usedDefines the current test site to be used based onSiteModelCall this method if you want to use another user rather than admin defined inTasPropertiesproperties fileusingUserHome(String username) Defines the current User Home to be used Example: /User Homes/withJMX()
-
Field Details
-
currentUser
This is the currentUser that we will use for creating specific test data If none specified we will use the admin user defined in default.properties -
tasProperties
-
PASSWORD
-
EMAIL
-
-
Constructor Details
-
TestData
public TestData()
-
-
Method Details
-
isAFile
Check ifpassed as parameter is a file or not based on extension -
usingUser
Call this method if you want to use another user rather than admin defined inTasPropertiesproperties file -
usingAdmin
Description copied from interface:DSLDefines the current user to be Admin- Specified by:
usingAdminin interfaceDSL<Data>- Returns:
-
getAdminUser
-
getCurrentUser
Description copied from interface:DSLgets the current test user- Specified by:
getCurrentUserin interfaceDSL<Data>- Returns:
-
usingRoot
-
getCurrentSpace
- Specified by:
getCurrentSpacein interfaceDSL<Data>- Returns:
- the current Repository Space
-
setCurrentSpace
Description copied from interface:DSLDSL.getSitesPath(), DSL.getUserHomesPath(),DSL.getDataDictionaryPath(), etc If nothing is specified, the root folder is used- Specified by:
setCurrentSpacein interfaceDSL<Data>
-
usingResource
Resource can be a folder, file where we want to create new content or make assertion. The resource is the current object tested in your test- Specified by:
usingResourcein interfaceDSL<Data>- Returns:
-
usingSite
Description copied from interface:DSLDefines the current test site to be used -
usingSite
Description copied from interface:DSLDefines the current test site to be used based onSiteModel -
usingUserHome
Description copied from interface:DSLDefines the current User Home to be used Example: /User Homes/- Specified by:
usingUserHomein interfaceDSL<Data>- Returns:
-
usingUserHome
- Specified by:
usingUserHomein interfaceDSL<Data>- Returns:
- the userhome path based on
DSL.getCurrentUser()
-
getRootPath
- Specified by:
getRootPathin interfaceDSL<Data>- Returns:
- the root path
- Throws:
TestConfigurationException
-
getSitesPath
- Specified by:
getSitesPathin interfaceDSL<Data>- Returns:
- the Sites path Example: /Sites
- Throws:
TestConfigurationException
-
getUserHomesPath
- Specified by:
getUserHomesPathin interfaceDSL<Data>- Returns:
- user home path Example: /User Homes
- Throws:
TestConfigurationException
-
getDataDictionaryPath
- Specified by:
getDataDictionaryPathin interfaceDSL<Data>- Returns:
- the Data Dictionary path /Data Dictionary
- Throws:
TestConfigurationException
-
getLastNodeId
-
setLastNodeId
-
getCurrentSite
-
setCurrentSite
-
getLastResource
-
setLastResource
Set last resource with content protocol location- Parameters:
lastResource-
-
setCurrentUser
-
usingLastServerLogLines
- Throws:
Exception
-
assertLogLineIs
-
assertExtensionAmpExists
- Throws:
Exception
-
getAlfrescoHome
Returns Alfresco Content Services Home (Alfresco root) directory using JMX property- Returns:
- Alfresco Content Services Home (Alfresco root) directory
- Throws:
Exception
-
withJMX
- Returns:
- JMX DSL for this wrapper
-