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);
}
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();
}
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);
}
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));
}
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));
}
Aggregations