PL-8228 Ability to change logging options for tests using command line parameters

This commit is contained in:
Yuriy Artamonov 2016-11-18 15:19:46 +04:00
parent 3f9edce5ee
commit 28c1034fd7

View File

@ -23,6 +23,7 @@ import com.haulmont.cuba.core.global.*;
import com.haulmont.cuba.core.sys.AppContext;
import mockit.Mocked;
import mockit.NonStrictExpectations;
import org.apache.commons.lang.StringUtils;
import java.util.ArrayList;
import java.util.List;
@ -71,6 +72,13 @@ public class CubaClientTestCase {
protected TestMessageTools messageTools;
public CubaClientTestCase() {
String property = System.getProperty("logback.configurationFile");
if (StringUtils.isBlank(property)) {
System.setProperty("logback.configurationFile", "test-logback.xml");
}
}
/**
* Add entities package to build metadata from. Should be invoked by concrete test classes in their @Before method.
* @param pack package FQN, e.g. <code>com.haulmont.cuba.core.entity</code>