public class AlfrescoPeople extends AbstractPersonRule
public class YourTestClass
{
// Normally we would initialise the spring application context in another rule.
@ClassRule public static final ApplicationContextInit APP_CONTEXT_RULE = new ApplicationContextInit();
// This rule will give us 8 GUID-named users.
@Rule public final AlfrescoPeople testPeople = new AlfrescoPeople(APP_CONTEXT_RULE, 8);
@Test public void aTestMethod()
{
Set<String> userNames = testPeople.getUsernames();
// etc
}
}
appContext, appContextRule, EMAIL, FIRST_NAME, JOB_TITLE, LAST_NAME, PASSWORD| Constructor and Description |
|---|
AlfrescoPeople(ApplicationContextInit appContextRule,
int personCount) |
AlfrescoPeople(org.springframework.context.ApplicationContext appContext,
int personCount) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
after() |
protected void |
before() |
java.util.Set |
getUsernames() |
createPerson, deletePerson, getApplicationContextpublic AlfrescoPeople(org.springframework.context.ApplicationContext appContext,
int personCount)
appContext - the spring app context (needed to get at Alfresco services).personCount - the number of users to be createdpublic AlfrescoPeople(ApplicationContextInit appContextRule, int personCount)
appContextRule - a rule which can be used to retrieve the spring app context.personCount - the number of users to be createdprotected void before()
throws java.lang.Throwable
before in class org.junit.rules.ExternalResourcejava.lang.Throwableprotected void after()
after in class org.junit.rules.ExternalResourcepublic java.util.Set getUsernames()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.