Package org.jsonschema2pojo

Examples of org.jsonschema2pojo.SchemaStore


        JDefinedClass jclass = new JCodeModel()._class(TARGET_CLASS_NAME);

        TypeRule mockTypeRule = mock(TypeRule.class);
        when(mockRuleFactory.getTypeRule()).thenReturn(mockTypeRule);
        when(mockRuleFactory.getSchemaStore()).thenReturn(new SchemaStore());

        ArgumentCaptor<JsonNode> captureJsonNode = ArgumentCaptor.forClass(JsonNode.class);
        ArgumentCaptor<Schema> captureSchema = ArgumentCaptor.forClass(Schema.class);

        rule.apply(NODE_NAME, schemaWithRef, jclass, null);
View Full Code Here


        JType previouslyGeneratedType = mock(JType.class);

        URI schemaUri = getClass().getResource("/schema/address.json").toURI();

        SchemaStore schemaStore = new SchemaStore();
        Schema schema = schemaStore.create(schemaUri);
        schema.setJavaType(previouslyGeneratedType);

        when(mockRuleFactory.getSchemaStore()).thenReturn(schemaStore);

        ObjectNode schemaNode = new ObjectMapper().createObjectNode();
View Full Code Here

    @Test
    public void generationConfigIsReturned() {

        GenerationConfig mockGenerationConfig = mock(GenerationConfig.class);

        RuleFactory ruleFactory = new RuleFactory(mockGenerationConfig, new NoopAnnotator(), new SchemaStore());

        assertThat(ruleFactory.getGenerationConfig(), is(sameInstance(mockGenerationConfig)));

    }
View Full Code Here

    }

    @Test
    public void schemaStoreIsReturned() {

        SchemaStore mockSchemaStore = mock(SchemaStore.class);

        RuleFactory ruleFactory = new RuleFactory(new DefaultGenerationConfig(), new NoopAnnotator(), mockSchemaStore);

        assertThat(ruleFactory.getSchemaStore(), is(sameInstance(mockSchemaStore)));
View Full Code Here

     * Create a rule factory with the default generation config options.
     *
     * @see DefaultGenerationConfig
     */
    public RuleFactory() {
        this(new DefaultGenerationConfig(), new Jackson2Annotator(), new SchemaStore());
    }
View Full Code Here

TOP

Related Classes of org.jsonschema2pojo.SchemaStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.