Search in sources :

Example 51 with BeforeTest

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();
}
Also used : ODatabaseDocumentTx(com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx) BeforeTest(org.testng.annotations.BeforeTest)

Example 52 with BeforeTest

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);
}
Also used : ODatabaseDocumentTx(com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx) BeforeTest(org.testng.annotations.BeforeTest)

Example 53 with BeforeTest

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);
}
Also used : ServletConfig(javax.servlet.ServletConfig) RefineBrokerImpl(com.google.refine.broker.RefineBrokerImpl) BeforeTest(org.testng.annotations.BeforeTest)

Example 54 with BeforeTest

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);
}
Also used : Filter(com.linkedin.restli.server.filter.Filter) Engine(com.linkedin.parseq.Engine) BeforeTest(org.testng.annotations.BeforeTest)

Example 55 with BeforeTest

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);
}
Also used : FilterChainCallbackImpl(com.linkedin.restli.internal.server.filter.FilterChainCallbackImpl) RestLiFilterChain(com.linkedin.restli.internal.server.filter.RestLiFilterChain) BeforeTest(org.testng.annotations.BeforeTest)

Aggregations

BeforeTest (org.testng.annotations.BeforeTest)80 HashMap (java.util.HashMap)8 CommandManager (com.sun.identity.cli.CommandManager)6 Path (java.nio.file.Path)6 File (java.io.File)5 Injector (com.google.inject.Injector)4 PinotHelixResourceManager (com.linkedin.pinot.controller.helix.core.PinotHelixResourceManager)4 Series (com.axibase.tsd.api.model.series.Series)3 AbstractTableConfig (com.linkedin.pinot.common.config.AbstractTableConfig)3 ArrayList (java.util.ArrayList)3 Parameters (org.testng.annotations.Parameters)3 SSOException (com.iplanet.sso.SSOException)2 Schema (com.linkedin.pinot.common.data.Schema)2 SegmentGeneratorConfig (com.linkedin.pinot.core.indexsegment.generator.SegmentGeneratorConfig)2 SegmentIndexCreationDriver (com.linkedin.pinot.core.segment.creator.SegmentIndexCreationDriver)2 SegmentIndexCreationDriverImpl (com.linkedin.pinot.core.segment.creator.impl.SegmentIndexCreationDriverImpl)2 ThirdEyeConfigProperties (com.linkedin.thirdeye.hadoop.config.ThirdEyeConfigProperties)2 ODatabaseDocumentTx (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx)2 OrganizationConfigManager (com.sun.identity.sm.OrganizationConfigManager)2 SMSException (com.sun.identity.sm.SMSException)2