use of io.aklivity.zilla.runtime.engine.Configuration.DoublePropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldGetDoubleProperty.
@Test
public void shouldGetDoubleProperty() {
System.setProperty("scope.double.property.name", Double.toString(0.1234));
ConfigurationDef configDef = new ConfigurationDef("scope");
DoublePropertyDef propertyDef = configDef.property("double.property.name", 0.5678);
Configuration config = new Configuration();
assertEquals(0.1234, propertyDef.getAsDouble(config), 0.0);
}
use of io.aklivity.zilla.runtime.engine.Configuration.DoublePropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldDefaultDoubleProperty.
@Test
public void shouldDefaultDoubleProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
DoublePropertyDef propertyDef = configDef.property("double.property.name", 0.1234);
Configuration config = new Configuration();
assertEquals(0.1234, propertyDef.getAsDouble(config), 0.0);
}
use of io.aklivity.zilla.runtime.engine.Configuration.DoublePropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldSupplyDefaultDoubleProperty.
@Test
public void shouldSupplyDefaultDoubleProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
DoublePropertyDef propertyDef = configDef.property("double.property.name", (ToDoubleFunction<Configuration>) c -> 0.1234);
Configuration config = new Configuration();
assertEquals(0.1234, propertyDef.getAsDouble(config), 0.0);
}
Aggregations