Search in sources :

Example 11 with BindingConfig

use of io.aklivity.zilla.runtime.engine.config.BindingConfig in project zilla by aklivity.

the class NamespaceConfigAdapterTest method shouldWriteNamespaceWithBinding.

@Test
public void shouldWriteNamespaceWithBinding() {
    BindingConfig binding = new BindingConfig(null, "test", "test", SERVER, null, emptyList(), null);
    NamespaceConfig namespace = new NamespaceConfig("test", emptyList(), emptyList(), singletonList(binding));
    String text = jsonb.toJson(namespace);
    assertThat(text, not(nullValue()));
    assertThat(text, equalTo("{\"name\":\"test\",\"bindings\":{\"test\":{\"type\":\"test\",\"kind\":\"server\"}}}"));
}
Also used : NamespaceConfig(io.aklivity.zilla.runtime.engine.config.NamespaceConfig) BindingConfig(io.aklivity.zilla.runtime.engine.config.BindingConfig) Test(org.junit.Test)

Aggregations

BindingConfig (io.aklivity.zilla.runtime.engine.config.BindingConfig)11 Test (org.junit.Test)6 RouteConfig (io.aklivity.zilla.runtime.engine.config.RouteConfig)4 MessageConsumer (io.aklivity.zilla.runtime.engine.binding.function.MessageConsumer)2 NamespaceConfig (io.aklivity.zilla.runtime.engine.config.NamespaceConfig)2 NamespacedRef (io.aklivity.zilla.runtime.engine.config.NamespacedRef)2 JsonArrayBuilder (jakarta.json.JsonArrayBuilder)2 JsonObject (jakarta.json.JsonObject)2 JsonObjectBuilder (jakarta.json.JsonObjectBuilder)2 LinkedList (java.util.LinkedList)2 List (java.util.List)2 BeginFW (io.aklivity.zilla.runtime.binding.echo.internal.types.stream.BeginFW)1 BeginFW (io.aklivity.zilla.runtime.binding.fan.internal.types.stream.BeginFW)1 Engine (io.aklivity.zilla.runtime.engine.Engine)1 EngineConfiguration (io.aklivity.zilla.runtime.engine.EngineConfiguration)1 KindConfig (io.aklivity.zilla.runtime.engine.config.KindConfig)1 OptionsConfig (io.aklivity.zilla.runtime.engine.config.OptionsConfig)1 OptionsConfigAdapterSpi (io.aklivity.zilla.runtime.engine.config.OptionsConfigAdapterSpi)1 VaultConfig (io.aklivity.zilla.runtime.engine.config.VaultConfig)1 EngineExtContext (io.aklivity.zilla.runtime.engine.ext.EngineExtContext)1