use of io.aklivity.zilla.runtime.engine.Configuration.FloatPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldGetFloatProperty.
@Test
public void shouldGetFloatProperty() {
System.setProperty("scope.float.property.name", Float.toString(0.1234f));
ConfigurationDef configDef = new ConfigurationDef("scope");
FloatPropertyDef propertyDef = configDef.property("float.property.name", 0.5678f);
Configuration config = new Configuration();
assertEquals(0.1234f, propertyDef.getAsFloat(config), 0.0f);
}
use of io.aklivity.zilla.runtime.engine.Configuration.FloatPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldSupplyDefaultFloatProperty.
@Test
public void shouldSupplyDefaultFloatProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
FloatPropertyDef propertyDef = configDef.property("float.property.name", (ToFloatFunction<Configuration>) c -> 0.1234f);
Configuration config = new Configuration();
assertEquals(0.1234f, propertyDef.getAsFloat(config), 0.0f);
}
use of io.aklivity.zilla.runtime.engine.Configuration.FloatPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldDefaultFloatProperty.
@Test
public void shouldDefaultFloatProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
FloatPropertyDef propertyDef = configDef.property("float.property.name", 0.1234f);
Configuration config = new Configuration();
assertEquals(0.1234f, propertyDef.getAsFloat(config), 0.0f);
}
Aggregations