use of org.testng.annotations.BeforeTest in project orientdb by orientechnologies.
the class ORecordLazySetPeristentTest method init.
@BeforeTest
public void init() throws Exception {
String url = "memory:" + ORecordLazySetPeristentTest.class.getSimpleName();
db = new ODatabaseDocumentTx(url);
db = db.create();
}
use of org.testng.annotations.BeforeTest in project orientdb by orientechnologies.
the class ODocumentFieldConversionTest method before.
@BeforeTest
public void before() {
db = new ODatabaseDocumentTx("memory:" + this.getClass().getSimpleName());
db.create();
clazz = db.getMetadata().getSchema().createClass("testClass");
clazz.createProperty("integer", OType.INTEGER);
clazz.createProperty("string", OType.STRING);
clazz.createProperty("boolean", OType.BOOLEAN);
clazz.createProperty("long", OType.LONG);
clazz.createProperty("float", OType.FLOAT);
clazz.createProperty("double", OType.DOUBLE);
clazz.createProperty("decimal", OType.DECIMAL);
clazz.createProperty("date", OType.DATE);
clazz.createProperty("byteList", OType.EMBEDDEDLIST, OType.BYTE);
clazz.createProperty("integerList", OType.EMBEDDEDLIST, OType.INTEGER);
clazz.createProperty("longList", OType.EMBEDDEDLIST, OType.LONG);
clazz.createProperty("stringList", OType.EMBEDDEDLIST, OType.STRING);
clazz.createProperty("floatList", OType.EMBEDDEDLIST, OType.FLOAT);
clazz.createProperty("doubleList", OType.EMBEDDEDLIST, OType.DOUBLE);
clazz.createProperty("decimalList", OType.EMBEDDEDLIST, OType.DECIMAL);
clazz.createProperty("booleanList", OType.EMBEDDEDLIST, OType.BOOLEAN);
clazz.createProperty("dateList", OType.EMBEDDEDLIST, OType.DATE);
clazz.createProperty("byteSet", OType.EMBEDDEDSET, OType.BYTE);
clazz.createProperty("integerSet", OType.EMBEDDEDSET, OType.INTEGER);
clazz.createProperty("longSet", OType.EMBEDDEDSET, OType.LONG);
clazz.createProperty("stringSet", OType.EMBEDDEDSET, OType.STRING);
clazz.createProperty("floatSet", OType.EMBEDDEDSET, OType.FLOAT);
clazz.createProperty("doubleSet", OType.EMBEDDEDSET, OType.DOUBLE);
clazz.createProperty("decimalSet", OType.EMBEDDEDSET, OType.DECIMAL);
clazz.createProperty("booleanSet", OType.EMBEDDEDSET, OType.BOOLEAN);
clazz.createProperty("dateSet", OType.EMBEDDEDSET, OType.DATE);
clazz.createProperty("byteMap", OType.EMBEDDEDMAP, OType.BYTE);
clazz.createProperty("integerMap", OType.EMBEDDEDMAP, OType.INTEGER);
clazz.createProperty("longMap", OType.EMBEDDEDMAP, OType.LONG);
clazz.createProperty("stringMap", OType.EMBEDDEDMAP, OType.STRING);
clazz.createProperty("floatMap", OType.EMBEDDEDMAP, OType.FLOAT);
clazz.createProperty("doubleMap", OType.EMBEDDEDMAP, OType.DOUBLE);
clazz.createProperty("decimalMap", OType.EMBEDDEDMAP, OType.DECIMAL);
clazz.createProperty("booleanMap", OType.EMBEDDEDMAP, OType.BOOLEAN);
clazz.createProperty("dateMap", OType.EMBEDDEDMAP, OType.DATE);
}
use of org.testng.annotations.BeforeTest in project OpenRefine by OpenRefine.
the class RefineBrokerTests method test_init.
@BeforeTest
public void test_init() throws Exception {
logger = LoggerFactory.getLogger(this.getClass());
config = mock(ServletConfig.class);
when(config.getInitParameter("refine.data")).thenReturn(data.getAbsolutePath());
when(config.getInitParameter("refine.development")).thenReturn("true");
broker = new RefineBrokerImpl();
broker.init(config);
}
use of org.testng.annotations.BeforeTest in project rest.li by linkedin.
the class TestRestLiServer method setUp.
@BeforeTest
protected void setUp() {
// silence null engine warning and get EasyMock failure if engine is used
Engine fakeEngine = EasyMock.createMock(Engine.class);
_mockFilter = EasyMock.createMock(Filter.class);
setUpServer(fakeEngine);
setupServerWithFilters(fakeEngine);
setupServerWithCustomErrorResponseConfig(fakeEngine);
EasyMock.replay(fakeEngine);
}
use of org.testng.annotations.BeforeTest in project rest.li by linkedin.
the class TestRestLiCallback method setUp.
@BeforeTest
protected void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
_filterResponseContextFactory = new RestLiFilterResponseContextFactory<Object>(_restRequest, _routingResult, _responseHandler);
_filterChainCallback = new FilterChainCallbackImpl(_routingResult, _methodInvoker, _adapter, _requestExecutionReportBuilder, _requestAttachmentReader, _responseHandler, _callback);
_zeroFilterChain = new RestLiFilterChain(_filterChainCallback);
_oneFilterChain = new RestLiFilterChain(Arrays.asList(_filter), _filterChainCallback);
_twoFilterChain = new RestLiFilterChain(Arrays.asList(_filter, _filter), _filterChainCallback);
_noFilterRestLiCallback = new RestLiCallback<Object>(_filterRequestContext, _filterResponseContextFactory, _zeroFilterChain);
_oneFilterRestLiCallback = new RestLiCallback<Object>(_filterRequestContext, _filterResponseContextFactory, _oneFilterChain);
_twoFilterRestLiCallback = new RestLiCallback<Object>(_filterRequestContext, _filterResponseContextFactory, _twoFilterChain);
}
Aggregations