mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-09-17 14:21:20 +00:00
51 lines
1.5 KiB
Java
51 lines
1.5 KiB
Java
package org.alfresco.rest;
|
|
|
|
import org.alfresco.rest.core.RestProperties;
|
|
import org.alfresco.rest.core.RestWrapper;
|
|
import org.alfresco.utility.TasProperties;
|
|
import org.alfresco.utility.data.DataContent;
|
|
import org.alfresco.utility.data.DataSite;
|
|
import org.alfresco.utility.data.DataUser;
|
|
import org.alfresco.utility.network.ServerHealth;
|
|
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 abstract class RestTest extends AbstractTestNGSpringContextTests
|
|
{
|
|
@Autowired
|
|
protected RestProperties restProperties;
|
|
|
|
@Autowired
|
|
protected TasProperties properties;
|
|
|
|
@Autowired
|
|
protected ServerHealth serverHealth;
|
|
|
|
@Autowired
|
|
protected RestWrapper restClient;
|
|
|
|
@Autowired
|
|
protected DataUser dataUser;
|
|
|
|
@Autowired
|
|
protected DataSite dataSite;
|
|
|
|
@Autowired
|
|
protected DataContent dataContent;
|
|
|
|
@BeforeClass(alwaysRun = true)
|
|
public void setupRestTest() throws Exception
|
|
{
|
|
serverHealth.assertServerIsOnline();
|
|
|
|
RestAssured.baseURI = restProperties.envProperty().getTestServerUrl();
|
|
RestAssured.port = restProperties.envProperty().getPort();
|
|
RestAssured.basePath = restProperties.getRestBasePath();
|
|
}
|
|
}
|