update simple test

This commit is contained in:
Paul Brodner
2016-08-03 15:56:17 +03:00
parent 2ba01df148
commit 2c8dcec779
2 changed files with 19 additions and 15 deletions

View File

@@ -8,13 +8,15 @@ import org.testng.annotations.BeforeClass;
import com.jayway.restassured.RestAssured;
@ContextConfiguration("classpath:alfresco-restapi-context.xml")
public class BaseRestTest extends AbstractTestNGSpringContextTests {
public class BaseRestTest extends AbstractTestNGSpringContextTests
{
@Autowired
protected RestProperties restProperties;
@BeforeClass
public void setup() {
public void setup()
{
RestAssured.baseURI = restProperties.envProperty().getTestServerUrl();
RestAssured.port = restProperties.envProperty().getPort();
RestAssured.basePath = restProperties.getRestBasePath();

View File

@@ -6,10 +6,12 @@ import org.alfresco.rest.BaseRestTest;
import org.alfresco.tester.model.UserModel;
import org.testng.annotations.Test;
public class SitesTest extends BaseRestTest {
public class SitesTest extends BaseRestTest
{
@Test
public void getSite() {
public void getSite()
{
UserModel admin = new UserModel("admin", "admin");
System.out.println(onRestAPI().withAuthUser(admin).onSites().getSite("SiteName1470151654495").getTitle());