Search in sources :

Example 1 with KnotxFlowConfiguration

use of io.knotx.server.configuration.KnotxFlowConfiguration 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)

Aggregations

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