public abstract class TestData<Data> extends Object implements DSL<Data>
| Modifier and Type | Field and Description |
|---|---|
protected UserModel |
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
|
static String |
EMAIL |
static String |
PASSWORD |
protected TasProperties |
tasProperties |
| Constructor and Description |
|---|
TestData() |
| Modifier and Type | Method and Description |
|---|---|
void |
assertExtensionAmpExists(String moduleId) |
Data |
assertLogLineIs(String logLine) |
UserModel |
getAdminUser() |
String |
getAlfrescoHome()
Returns Alfresco Content Services Home (Alfresco root) directory using JMX property
|
String |
getCurrentSite() |
String |
getCurrentSpace() |
UserModel |
getCurrentUser()
gets the current test user
|
String |
getDataDictionaryPath() |
String |
getLastResource() |
String |
getRootPath() |
String |
getSitesPath() |
String |
getUserHomesPath() |
static boolean |
isAFile(String filename)
Check if
|
void |
setCurrentSite(String currentSite) |
Data |
setCurrentSpace(String currentRepositorySpace)
DSL.getSitesPath(), DSL.getUserHomesPath(), DSL.getDataDictionaryPath(), etc If nothing is
specified, the root folder is used |
void |
setCurrentUser(UserModel testUser) |
Data |
setLastResource(String lastResource)
Set last resource with content protocol location
|
Data |
usingAdmin()
Defines the current user to be Admin
|
Data |
usingLastServerLogLines(int lineNumber) |
Data |
usingResource(ContentModel model)
Resource can be a folder, file where we want to create new content or
make assertion.
|
Data |
usingRoot() |
Data |
usingSite(SiteModel siteModel)
Defines the current test site to be used based on
SiteModel |
Data |
usingSite(String siteId)
Defines the current test site to be used
|
Data |
usingUser(UserModel user)
Call this method if you want to use another user rather than admin
defined in
TasProperties properties file |
Data |
usingUserHome() |
Data |
usingUserHome(String username)
Defines the current User Home to be used Example: /User Homes/
|
DSLJmx |
withJMX() |
protected UserModel currentUser
@Autowired protected TasProperties tasProperties
public static String PASSWORD
public static String EMAIL
public static boolean isAFile(String filename)
public Data usingUser(UserModel user)
TasProperties properties filepublic Data usingAdmin()
DSLusingAdmin in interface DSL<Data>public UserModel getAdminUser()
public UserModel getCurrentUser()
DSLgetCurrentUser in interface DSL<Data>public String getCurrentSpace()
getCurrentSpace in interface DSL<Data>public Data setCurrentSpace(String currentRepositorySpace)
DSLDSL.getSitesPath(), DSL.getUserHomesPath(), DSL.getDataDictionaryPath(), etc If nothing is
specified, the root folder is usedsetCurrentSpace in interface DSL<Data>public Data usingResource(ContentModel model) throws Exception
usingResource in interface DSL<Data>Exceptionpublic Data usingSite(String siteId) throws Exception
DSLpublic Data usingSite(SiteModel siteModel) throws Exception
DSLSiteModelpublic Data usingUserHome(String username) throws Exception
DSLusingUserHome in interface DSL<Data>Exceptionpublic Data usingUserHome() throws Exception
usingUserHome in interface DSL<Data>DSL.getCurrentUser()Exceptionpublic String getRootPath() throws TestConfigurationException
getRootPath in interface DSL<Data>TestConfigurationExceptionpublic String getSitesPath() throws TestConfigurationException
getSitesPath in interface DSL<Data>TestConfigurationExceptionpublic String getUserHomesPath() throws TestConfigurationException
getUserHomesPath in interface DSL<Data>TestConfigurationExceptionpublic String getDataDictionaryPath() throws TestConfigurationException
getDataDictionaryPath in interface DSL<Data>TestConfigurationExceptionpublic String getCurrentSite()
public void setCurrentSite(String currentSite)
public String getLastResource()
public Data setLastResource(String lastResource)
lastResource - public void setCurrentUser(UserModel testUser)
public Data usingLastServerLogLines(int lineNumber) throws Exception
Exceptionpublic void assertExtensionAmpExists(String moduleId) throws Exception
Exceptionpublic String getAlfrescoHome() throws Exception
Exceptionpublic DSLJmx withJMX()
Copyright © 2005–2019 Alfresco Software. All rights reserved.