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