use of io.aklivity.zilla.runtime.engine.Configuration.ShortPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldSupplyDefaultShortProperty.
@Test
public void shouldSupplyDefaultShortProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
ShortPropertyDef propertyDef = configDef.property("short.property.name", (ToShortFunction<Configuration>) c -> Short.decode("0x7fff"));
Configuration config = new Configuration();
assertEquals(Short.MAX_VALUE, propertyDef.getAsShort(config));
}
use of io.aklivity.zilla.runtime.engine.Configuration.ShortPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldGetShortProperty.
@Test
public void shouldGetShortProperty() {
System.setProperty("scope.short.property.name", "0x7fff");
ConfigurationDef configDef = new ConfigurationDef("scope");
ShortPropertyDef propertyDef = configDef.property("short.property.name", Short.decode("0x00"));
Configuration config = new Configuration();
assertEquals(Short.MAX_VALUE, propertyDef.getAsShort(config));
}
use of io.aklivity.zilla.runtime.engine.Configuration.ShortPropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldDefaultShortProperty.
@Test
public void shouldDefaultShortProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
ShortPropertyDef propertyDef = configDef.property("short.property.name", Short.decode("0x7fff"));
Configuration config = new Configuration();
assertEquals(Short.MAX_VALUE, propertyDef.getAsShort(config));
}
Aggregations