use of io.aklivity.zilla.runtime.engine.Configuration.BytePropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldDefaultByteProperty.
@Test
public void shouldDefaultByteProperty() {
ConfigurationDef configDef = new ConfigurationDef("scope");
BytePropertyDef propertyDef = configDef.property("byte.property.name", Byte.decode("0x7f"));
Configuration config = new Configuration();
assertEquals(Byte.MAX_VALUE, propertyDef.getAsByte(config));
}
use of io.aklivity.zilla.runtime.engine.Configuration.BytePropertyDef 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));
}
use of io.aklivity.zilla.runtime.engine.Configuration.BytePropertyDef in project zilla by aklivity.
the class ConfigurationTest method shouldGetByteProperty.
@Test
public void shouldGetByteProperty() {
System.setProperty("scope.byte.property.name", "0x7f");
ConfigurationDef configDef = new ConfigurationDef("scope");
BytePropertyDef propertyDef = configDef.property("byte.property.name", Byte.decode("0x00"));
Configuration config = new Configuration();
assertEquals(Byte.MAX_VALUE, propertyDef.getAsByte(config));
}
Aggregations