Search in sources :

Example 76 with BeforeTest

use of org.testng.annotations.BeforeTest in project carbon-apimgt by wso2.

the class APIStoreImplTestCase method setup.

@BeforeTest
public void setup() throws Exception {
    WorkflowExtensionsConfigBuilder.build(new ConfigProvider() {

        @Override
        public <T> T getConfigurationObject(Class<T> configClass) throws ConfigurationException {
            T workflowConfig = (T) new WorkflowConfig();
            return workflowConfig;
        }

        @Override
        public Object getConfigurationObject(String s) throws ConfigurationException {
            return null;
        }

        public <T> T getConfigurationObject(String s, Class<T> aClass) throws ConfigurationException {
            return null;
        }
    });
    ConfigProvider configProvider = Mockito.mock(ConfigProvider.class);
    ServiceReferenceHolder.getInstance().setConfigProvider(configProvider);
}
Also used : WorkflowConfig(org.wso2.carbon.apimgt.core.models.WorkflowConfig) ConfigProvider(org.wso2.carbon.config.provider.ConfigProvider) ConfigurationException(org.wso2.carbon.config.ConfigurationException) BeforeTest(org.testng.annotations.BeforeTest)

Example 77 with BeforeTest

use of org.testng.annotations.BeforeTest in project atsd-api-test by axibase.

the class CompactedLimitTest method prepareData.

@BeforeTest
public static void prepareData() throws Exception {
    Series series = new Series(Mocks.entity(), METRIC_NAME);
    Sample[] samples = new Sample[SAMPLE_COUNT];
    for (int i = 0; i < SAMPLE_COUNT; i++) {
        String sampleDate = String.format("2018-01-%02dT00:00:00.000Z", i + 1);
        samples[i] = Sample.ofDateInteger(sampleDate, i + 1);
    }
    series.addSamples(samples);
    SeriesMethod.insertSeriesCheck(series);
    CompactionMethod.performCompaction();
}
Also used : Series(com.axibase.tsd.api.model.series.Series) Sample(com.axibase.tsd.api.model.series.Sample) BeforeTest(org.testng.annotations.BeforeTest)

Example 78 with BeforeTest

use of org.testng.annotations.BeforeTest in project atsd-api-test by axibase.

the class DatetimeAggregationTest method prepareData.

@BeforeTest
public void prepareData() throws Exception {
    String entity = entity();
    TEST_METRIC = metric();
    Series series = new Series(entity, TEST_METRIC);
    series.addSamples(Sample.ofDateInteger("2017-01-01T00:00:00Z", 1), Sample.ofDateInteger("2017-01-02T00:00:00Z", 2), Sample.ofDateInteger("2017-01-03T00:00:00Z", 3));
    insertSeriesCheck(series);
}
Also used : Series(com.axibase.tsd.api.model.series.Series) BeforeTest(org.testng.annotations.BeforeTest)

Example 79 with BeforeTest

use of org.testng.annotations.BeforeTest in project athenz by yahoo.

the class RoleAuthorityTest method loadKeys.

@BeforeTest
private void loadKeys() throws IOException {
    Path path = Paths.get("./src/test/resources/zts_private_k0.key");
    ztsPrivateKeyStringK0 = new String(Files.readAllBytes(path));
    path = Paths.get("./src/test/resources/zts_private_k1.key");
    ztsPrivateKeyStringK1 = new String(Files.readAllBytes(path));
}
Also used : Path(java.nio.file.Path) BeforeTest(org.testng.annotations.BeforeTest)

Example 80 with BeforeTest

use of org.testng.annotations.BeforeTest in project athenz by yahoo.

the class PrincipalAuthorityTest method loadKeys.

@BeforeTest
private void loadKeys() throws IOException {
    Path path = Paths.get("./src/test/resources/fantasy_private_k0.key");
    servicePrivateKeyStringK0 = new String(Files.readAllBytes(path));
    path = Paths.get("./src/test/resources/fantasy_private_k1.key");
    servicePrivateKeyStringK1 = new String(Files.readAllBytes(path));
}
Also used : Path(java.nio.file.Path) 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