use of org.jsonschema2pojo.SchemaStore in project jsonschema2pojo by joelittlejohn.
the class FormatRuleJodaTest method setupConfig.
@Before
public void setupConfig() {
when(config.isUseJodaLocalTimes()).thenReturn(true);
when(config.isUseJodaLocalDates()).thenReturn(true);
when(config.isUseJodaDates()).thenReturn(true);
rule = new FormatRule(new RuleFactory(config, new NoopAnnotator(), new SchemaStore()));
}
use of org.jsonschema2pojo.SchemaStore in project jsonschema2pojo by joelittlejohn.
the class DigitsRuleTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
rule = new DigitsRule(new RuleFactory(config, new NoopAnnotator(), new SchemaStore()));
when(config.isUseJakartaValidation()).thenReturn(useJakartaValidation);
}
use of org.jsonschema2pojo.SchemaStore in project jsonschema2pojo by joelittlejohn.
the class MinItemsMaxItemsRuleTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
rule = new MinItemsMaxItemsRule(new RuleFactory(config, new NoopAnnotator(), new SchemaStore()));
when(config.isUseJakartaValidation()).thenReturn(useJakartaValidation);
}
use of org.jsonschema2pojo.SchemaStore 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.SchemaStore 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)));
}
Aggregations