use of io.mantisrx.runtime.parameter.type.EnumParameter in project mantis by Netflix.
the class ParameterDefinitionTest method testEnumParameter.
@Test
public void testEnumParameter() {
Map<String, ParameterDefinition<?>> parameterDefinitions = new HashMap<>();
parameterDefinitions.put("foo", new EnumParameter<>(TestEnum.class).name("foo").required().validator(Validators.alwaysPass()).build());
Map<String, Parameter> parameters = new HashMap<>();
parameters.put("foo", new Parameter("foo", "A"));
Map<String, Object> parameterState = ParameterUtils.checkThenCreateState(parameterDefinitions, parameters);
Assert.assertEquals(TestEnum.A, parameterState.get("foo"));
}
Aggregations