use of io.aklivity.zilla.runtime.engine.Configuration.ToByteFunction in project zilla by aklivity.
the class ConfigurationTest method shouldSupplyDefaultByteProperty.
@Test
public void shouldSupplyDefaultByteProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
BytePropertyDef propertyDef = configDef.property("byte.property.name", (ToByteFunction<Configuration>) c -> Byte.decode("0x7f"));
Configuration config = new Configuration();
assertEquals(Byte.MAX_VALUE, propertyDef.getAsByte(config));
}
Aggregations