use of io.aklivity.zilla.runtime.engine.Configuration.ToFloatFunction 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);
}
Aggregations