Search in sources :

Example 1 with TestConditionConfig

use of io.aklivity.zilla.runtime.engine.internal.config.ConditionConfigAdapterTest.TestConditionConfig in project zilla by aklivity.

the class RouteConfigAdapterTest method shouldWriteRouteWhenMatch.

@Test
public void shouldWriteRouteWhenMatch() {
    RouteConfig route = new RouteConfig("test", singletonList(new TestConditionConfig("test")));
    String text = jsonb.toJson(route);
    assertThat(text, not(nullValue()));
    assertThat(text, equalTo("{\"exit\":\"test\",\"when\":[{\"match\":\"test\"}]}"));
}
Also used : RouteConfig(io.aklivity.zilla.runtime.engine.config.RouteConfig) TestConditionConfig(io.aklivity.zilla.runtime.engine.internal.config.ConditionConfigAdapterTest.TestConditionConfig) Test(org.junit.Test)

Aggregations

RouteConfig (io.aklivity.zilla.runtime.engine.config.RouteConfig)1 TestConditionConfig (io.aklivity.zilla.runtime.engine.internal.config.ConditionConfigAdapterTest.TestConditionConfig)1 Test (org.junit.Test)1