use of org.apache.ignite.internal.configuration.rest.presentation.hocon.HoconPresentation in project ignite-3 by apache.
the class ConfigurationPresentationTest method beforeAll.
/**
* Before all.
*/
@BeforeAll
static void beforeAll() {
Validator<Value, Object> validator = new Validator<>() {
/**
* {@inheritDoc}
*/
@Override
public void validate(Value annotation, ValidationContext<Object> ctx) {
if (Objects.equals("error", ctx.getNewValue())) {
ctx.addIssue(new ValidationIssue("Error word"));
}
}
};
cfgRegistry = new ConfigurationRegistry(List.of(TestRootConfiguration.KEY), Map.of(Value.class, Set.of(validator)), new TestConfigurationStorage(LOCAL), List.of(), List.of());
cfgRegistry.start();
cfgPresentation = new HoconPresentation(cfgRegistry);
cfg = cfgRegistry.getConfiguration(TestRootConfiguration.KEY);
}
Aggregations