use of org.jsonschema2pojo.NoopAnnotator in project jsonschema2pojo by joelittlejohn.
the class MinimumMaximumRuleTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
rule = new MinimumMaximumRule(new RuleFactory(config, new NoopAnnotator(), new SchemaStore()));
when(config.isUseJakartaValidation()).thenReturn(useJakartaValidation);
}
use of org.jsonschema2pojo.NoopAnnotator in project jsonschema2pojo by joelittlejohn.
the class RuleFactoryImplTest method generationConfigIsReturned.
@Test
public void generationConfigIsReturned() {
GenerationConfig mockGenerationConfig = mock(GenerationConfig.class);
RuleLogger mockRuleLogger = mock(RuleLogger.class);
RuleFactory ruleFactory = new RuleFactory(mockGenerationConfig, new NoopAnnotator(), new SchemaStore());
ruleFactory.setLogger(mockRuleLogger);
assertThat(ruleFactory.getGenerationConfig(), is(sameInstance(mockGenerationConfig)));
assertThat(ruleFactory.getLogger(), is(sameInstance(mockRuleLogger)));
}
use of org.jsonschema2pojo.NoopAnnotator in project jsonschema2pojo by joelittlejohn.
the class RuleFactoryImplTest method schemaStoreIsReturned.
@Test
public void schemaStoreIsReturned() {
SchemaStore mockSchemaStore = mock(SchemaStore.class);
RuleFactory ruleFactory = new RuleFactory(new DefaultGenerationConfig(), new NoopAnnotator(), mockSchemaStore);
assertThat(ruleFactory.getSchemaStore(), is(sameInstance(mockSchemaStore)));
}
use of org.jsonschema2pojo.NoopAnnotator in project jsonschema2pojo by joelittlejohn.
the class RuleFactoryImplTest method generationRuleLoggerIsReturned.
@Test
public void generationRuleLoggerIsReturned() {
GenerationConfig mockGenerationConfig = mock(GenerationConfig.class);
RuleLogger mockRuleLogger = mock(RuleLogger.class);
RuleFactory ruleFactory = new RuleFactory(new DefaultGenerationConfig(), new NoopAnnotator(), new SchemaStore());
ruleFactory.setLogger(mockRuleLogger);
assertThat(ruleFactory.getLogger(), is(sameInstance(mockRuleLogger)));
}
Aggregations