mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-10-08 14:51:20 +00:00
no message
This commit is contained in:
22
e2e-test/java/org/alfresco/rest/BaseRestTest.java
Normal file
22
e2e-test/java/org/alfresco/rest/BaseRestTest.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package org.alfresco.rest;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
|
||||
import com.jayway.restassured.RestAssured;
|
||||
|
||||
@ContextConfiguration("classpath:alfresco-restapi-context.xml")
|
||||
public class BaseRestTest extends AbstractTestNGSpringContextTests {
|
||||
|
||||
@Autowired
|
||||
protected RestProperties restProperties;
|
||||
|
||||
@BeforeClass
|
||||
public void setup() {
|
||||
RestAssured.baseURI = restProperties.envProperty().getTestServerUrl();
|
||||
RestAssured.port = restProperties.envProperty().getPort();
|
||||
RestAssured.basePath = restProperties.getRestBasePath();
|
||||
}
|
||||
}
|
17
e2e-test/java/org/alfresco/rest/v1/SitesTest.java
Normal file
17
e2e-test/java/org/alfresco/rest/v1/SitesTest.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package org.alfresco.rest.v1;
|
||||
|
||||
import static org.alfresco.rest.RestClientWrapper.onRestAPI;
|
||||
|
||||
import org.alfresco.rest.BaseRestTest;
|
||||
import org.alfresco.tester.model.UserModel;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
public class SitesTest extends BaseRestTest {
|
||||
|
||||
@Test
|
||||
public void getSite() {
|
||||
UserModel admin = new UserModel("admin", "admin");
|
||||
System.out.println(onRestAPI().withAuthUser(admin).onSites().getSite("SiteName1470151654495").getTitle());
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user