use of io.aklivity.zilla.runtime.engine.Configuration.CharPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldGetCharProperty.
@Test
public void shouldGetCharProperty() {
System.setProperty("scope.char.property.name", "a");
ConfigurationDef configDef = new ConfigurationDef("scope");
CharPropertyDef propertyDef = configDef.property("char.property.name", 'z');
Configuration config = new Configuration();
assertEquals('a', propertyDef.getAsChar(config));
}
use of io.aklivity.zilla.runtime.engine.Configuration.CharPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldDefaultCharProperty.
@Test
public void shouldDefaultCharProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
CharPropertyDef propertyDef = configDef.property("char.property.name", 'a');
Configuration config = new Configuration();
assertEquals('a', propertyDef.getAsChar(config));
}
use of io.aklivity.zilla.runtime.engine.Configuration.CharPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldSupplyDefaultCharProperty.
@Test
public void shouldSupplyDefaultCharProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
CharPropertyDef propertyDef = configDef.property("char.property.name", (ToCharFunction<Configuration>) c -> 'a');
Configuration config = new Configuration();
assertEquals('a', propertyDef.getAsChar(config));
}
Aggregations