mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
73 lines
2.0 KiB
Java
73 lines
2.0 KiB
Java
package org.alfresco.rest;
|
|
|
|
import java.lang.reflect.Method;
|
|
|
|
import org.alfresco.rest.core.RestProperties;
|
|
import org.alfresco.rest.core.RestWrapper;
|
|
import org.alfresco.utility.LogFactory;
|
|
import org.alfresco.utility.TasProperties;
|
|
import org.alfresco.utility.data.DataContent;
|
|
import org.alfresco.utility.data.DataGroup;
|
|
import org.alfresco.utility.data.DataSite;
|
|
import org.alfresco.utility.data.DataUser;
|
|
import org.alfresco.utility.data.DataWorkflow;
|
|
import org.alfresco.utility.network.ServerHealth;
|
|
import org.slf4j.Logger;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.test.context.ContextConfiguration;
|
|
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
|
|
import org.testng.annotations.AfterMethod;
|
|
import org.testng.annotations.BeforeClass;
|
|
import org.testng.annotations.BeforeMethod;
|
|
|
|
@ContextConfiguration("classpath:alfresco-restapi-context.xml")
|
|
public abstract class RestTest extends AbstractTestNGSpringContextTests
|
|
{
|
|
private static Logger LOG = LogFactory.getLogger();
|
|
|
|
@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;
|
|
|
|
@Autowired
|
|
protected DataGroup dataGroup;
|
|
|
|
@Autowired
|
|
protected DataWorkflow dataWorkflow;
|
|
|
|
@BeforeClass(alwaysRun = true)
|
|
public void checkServerHealth() throws Exception
|
|
{
|
|
serverHealth.assertServerIsOnline();
|
|
}
|
|
|
|
@BeforeMethod(alwaysRun=true)
|
|
public void showStartTestInfo(Method method)
|
|
{
|
|
LOG.info(String.format("*** STARTING Test: [%s] ***",method.getName()));
|
|
}
|
|
|
|
@AfterMethod(alwaysRun=true)
|
|
public void showEndTestInfo(Method method)
|
|
{
|
|
LOG.info(String.format("*** ENDING Test: [%s] ***", method.getName()));
|
|
}
|
|
}
|