use of com.github.victools.jsonschema.generator.OptionPreset in project jsonschema-generator by victools.
the class EnumModuleTest method initConfigBuilder.
/**
* Initialise configuration builder instance for the given JSON Schema version.
*
* @param schemaVersion designated JSON Schema version
*/
private void initConfigBuilder(SchemaVersion schemaVersion) {
this.prepareContextForVersion(schemaVersion);
SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(schemaVersion, new OptionPreset());
this.typeConfigPart = Mockito.spy(configBuilder.forTypesInGeneral());
this.fieldConfigPart = Mockito.spy(configBuilder.forFields());
this.methodConfigPart = Mockito.spy(configBuilder.forMethods());
this.builder = Mockito.spy(configBuilder);
Mockito.when(this.builder.forTypesInGeneral()).thenReturn(this.typeConfigPart);
Mockito.when(this.builder.forFields()).thenReturn(this.fieldConfigPart);
Mockito.when(this.builder.forMethods()).thenReturn(this.methodConfigPart);
}
Aggregations