use of io.aklivity.zilla.runtime.engine.Configuration.BooleanPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldSupplyDefaultBooleanProperty.
@Test
public void shouldSupplyDefaultBooleanProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
BooleanPropertyDef propertyDef = configDef.property("boolean.property.name", (Predicate<Configuration>) c -> true);
Configuration config = new Configuration();
assertTrue(propertyDef.getAsBoolean(config));
}
use of io.aklivity.zilla.runtime.engine.Configuration.BooleanPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldGetBooleanProperty.
@Test
public void shouldGetBooleanProperty() {
System.setProperty("scope.boolean.property.name", Boolean.TRUE.toString());
ConfigurationDef configDef = new ConfigurationDef("scope");
BooleanPropertyDef propertyDef = configDef.property("boolean.property.name", false);
Configuration config = new Configuration();
assertTrue(propertyDef.getAsBoolean(config));
}
use of io.aklivity.zilla.runtime.engine.Configuration.BooleanPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldDefaultBooleanProperty.
@Test
public void shouldDefaultBooleanProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
BooleanPropertyDef propertyDef = configDef.property("boolean.property.name", true);
Configuration config = new Configuration();
assertTrue(propertyDef.getAsBoolean(config));
}
Aggregations