Files
SearchServices/e2e-test/java/org/alfresco/rest/demo/SamplePeopleTests.java
T
Paul Brodner c7ec0786d8 core: add lastException in wrapper/formatting
initialize Node, People
test: update test to assert on last error. Remove @Bug annotation tests passed
2016-12-13 23:17:54 +02:00

32 lines
1.0 KiB
Java

package org.alfresco.rest.demo;
import org.alfresco.rest.RestTest;
import org.alfresco.utility.exception.DataPreparationException;
import org.alfresco.utility.model.UserModel;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@Test(groups = { "demo" })
public class SamplePeopleTests extends RestTest
{
private UserModel userModel;
private UserModel adminUser;
@BeforeClass(alwaysRun=true)
public void dataPreparation() throws DataPreparationException
{
userModel = dataUser.createUser(RandomStringUtils.randomAlphanumeric(20));
adminUser = dataUser.getAdminUser();
restClient.authenticateUser(adminUser);
}
@Test
public void adminShouldRetrievePerson() throws Exception
{
restClient.withCoreAPI().usingUser(userModel).getPerson().assertThat().field("id").isNotEmpty();
restClient.assertStatusCodeIs(HttpStatus.OK);
}
}