Search in sources :

Example 1 with JsonIntegrationTest

use of com.bakdata.conquery.integration.json.JsonIntegrationTest in project conquery by bakdata.

the class IntegrationTests method readTest.

private static DynamicTest readTest(Resource resource, String name, IntegrationTests integrationTests) {
    try (InputStream in = resource.open()) {
        JsonIntegrationTest test = new JsonIntegrationTest(in);
        ConqueryConfig conf = getConfigOverride(test, integrationTests.getWorkDir());
        name = test.getTestSpec().getLabel();
        TestConquery conquery = getCachedConqueryInstance(integrationTests.getWorkDir(), conf);
        return DynamicTest.dynamicTest(name, URI.create("classpath:/" + resource.getPath()), new IntegrationTest.Wrapper(name, conquery, test));
    } catch (Exception e) {
        return DynamicTest.dynamicTest(name, resource.getURI(), () -> {
            throw e;
        });
    }
}
Also used : JsonIntegrationTest(com.bakdata.conquery.integration.json.JsonIntegrationTest) TestConquery(com.bakdata.conquery.util.support.TestConquery) InputStream(java.io.InputStream) ConqueryConfig(com.bakdata.conquery.models.config.ConqueryConfig) ProgrammaticIntegrationTest(com.bakdata.conquery.integration.tests.ProgrammaticIntegrationTest) JsonIntegrationTest(com.bakdata.conquery.integration.json.JsonIntegrationTest) IOException(java.io.IOException)

Aggregations

JsonIntegrationTest (com.bakdata.conquery.integration.json.JsonIntegrationTest)1 ProgrammaticIntegrationTest (com.bakdata.conquery.integration.tests.ProgrammaticIntegrationTest)1 ConqueryConfig (com.bakdata.conquery.models.config.ConqueryConfig)1 TestConquery (com.bakdata.conquery.util.support.TestConquery)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1