use of io.aklivity.zilla.runtime.engine.Configuration.LongPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldDefaultLongProperty.
@Test
public void shouldDefaultLongProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
LongPropertyDef propertyDef = configDef.property("long.property.name", 1234L);
Configuration config = new Configuration();
assertEquals(1234L, propertyDef.getAsLong(config));
}
use of io.aklivity.zilla.runtime.engine.Configuration.LongPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldSupplyDefaultLongProperty.
@Test
public void shouldSupplyDefaultLongProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
LongPropertyDef propertyDef = configDef.property("long.property.name", (ToLongFunction<Configuration>) c -> 1234L);
Configuration config = new Configuration();
assertEquals(1234L, propertyDef.getAsLong(config));
}
use of io.aklivity.zilla.runtime.engine.Configuration.LongPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldGetLongProperty.
@Test
public void shouldGetLongProperty() {
System.setProperty("scope.long.property.name", Long.toString(1234L));
ConfigurationDef configDef = new ConfigurationDef("scope");
LongPropertyDef propertyDef = configDef.property("long.property.name", 5678L);
Configuration config = new Configuration();
assertEquals(1234L, propertyDef.getAsLong(config));
}
Aggregations