use of io.aklivity.zilla.runtime.engine.Configuration.IntPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldSupplyDefaultIntegerProperty.
@Test
public void shouldSupplyDefaultIntegerProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
IntPropertyDef propertyDef = configDef.property("integer.property.name", (ToIntFunction<Configuration>) c -> 1234);
Configuration config = new Configuration();
assertEquals(1234, propertyDef.getAsInt(config));
}
use of io.aklivity.zilla.runtime.engine.Configuration.IntPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldGetIntegerProperty.
@Test
public void shouldGetIntegerProperty() {
System.setProperty("scope.integer.property.name", Integer.toString(1234));
ConfigurationDef configDef = new ConfigurationDef("scope");
IntPropertyDef propertyDef = configDef.property("integer.property.name", 5678);
Configuration config = new Configuration();
assertEquals(1234, propertyDef.getAsInt(config));
}
use of io.aklivity.zilla.runtime.engine.Configuration.IntPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldDefaultIntegerProperty.
@Test
public void shouldDefaultIntegerProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
IntPropertyDef propertyDef = configDef.property("integer.property.name", 1234);
Configuration config = new Configuration();
assertEquals(1234, propertyDef.getAsInt(config));
}
Aggregations