Search in sources :

Example 1 with KnotxServerConfiguration

use of io.knotx.server.configuration.KnotxServerConfiguration in project knotx by Cognifide.

the class KnotxServerConfigurationRepositoriesTest method before.

@Before
public void before() throws Exception {
    JsonObject config = new JsonObject(FileReader.readText("test-config-server.json"));
    flowConfiguration = new KnotxServerConfiguration(config).getDefaultFlow();
}
Also used : KnotxServerConfiguration(io.knotx.server.configuration.KnotxServerConfiguration) JsonObject(io.vertx.core.json.JsonObject) Before(org.junit.Before)

Example 2 with KnotxServerConfiguration

use of io.knotx.server.configuration.KnotxServerConfiguration in project knotx by Cognifide.

the class SupportedMethodsAndPathsHandlerTest method before.

@Before
public void before() throws Exception {
    defaultFlow = new KnotxFlowConfiguration(new JsonObject(FileReader.readText("GETOnlyDefaultFlow.json")));
    customFlow = new KnotxFlowConfiguration(new JsonObject(FileReader.readText("GETOnlyCustomFlow.json")));
    KnotxServerConfiguration configuration = Mockito.mock(KnotxServerConfiguration.class);
    Mockito.when(configuration.getDefaultFlow()).thenReturn(defaultFlow);
    Mockito.when(configuration.getCustomFlow()).thenReturn(customFlow);
    tested = SupportedMethodsAndPathsHandler.create(configuration);
}
Also used : KnotxServerConfiguration(io.knotx.server.configuration.KnotxServerConfiguration) JsonObject(io.vertx.core.json.JsonObject) KnotxFlowConfiguration(io.knotx.server.configuration.KnotxFlowConfiguration) Before(org.junit.Before)

Example 3 with KnotxServerConfiguration

use of io.knotx.server.configuration.KnotxServerConfiguration in project knotx by Cognifide.

the class KnotxServerVerticle method init.

@Override
public void init(Vertx vertx, Context context) {
    super.init(vertx, context);
    configuration = new KnotxServerConfiguration(config());
}
Also used : KnotxServerConfiguration(io.knotx.server.configuration.KnotxServerConfiguration)

Aggregations

KnotxServerConfiguration (io.knotx.server.configuration.KnotxServerConfiguration)3 JsonObject (io.vertx.core.json.JsonObject)2 Before (org.junit.Before)2 KnotxFlowConfiguration (io.knotx.server.configuration.KnotxFlowConfiguration)1