Files
SearchServices/e2e-test/java/org/alfresco/rest/RestTest.java
Paul Brodner 44b810bffa using only models as parameters
adding ListUserWithRoles (removing HashMaps)
update sanity-rest
2016-09-29 14:56:54 +03:00

55 lines
1.6 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.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.annotations.BeforeClass;
import com.jayway.restassured.RestAssured;
@Component
@Scope(value = "prototype")
@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 checkServerHealth() throws Exception
{
serverHealth.assertServerIsOnline();
RestAssured.baseURI = restProperties.envProperty().getTestServerUrl();
RestAssured.port = restProperties.envProperty().getPort();
RestAssured.basePath = restProperties.getRestBasePath();
}
}