Package org.plugtree.training.simplevalidation.model

Examples of org.plugtree.training.simplevalidation.model.Address


    }

    @Test
    public void noErrorsValidation() {
        Person person = new Person("salaboy");
        person.addAddress(new Address(person.getId(), "7th", 123, "92013"));
        person.addPhone(new Phone(person.getId(), "555-1235"));

        StatefulKnowledgeSession ksession = createKSession();
        KnowledgeRuntimeLoggerFactory.newConsoleLogger(ksession);
View Full Code Here


    }

    @Test
    public void addressError() {
        Person person = new Person("salaboy");
        person.addAddress(new Address(person.getId(), "7th", null, "92013"));
        person.addPhone(new Phone(person.getId(), "555-1235"));

        StatefulKnowledgeSession ksession = createKSession();
        KnowledgeRuntimeLoggerFactory.newConsoleLogger(ksession);
View Full Code Here

        for (QueryResultsRow row : results) {
            System.out.println(">>> Error ( " + ((CorrectionRequest) row.get("$correction")).getError().toString() + ")");
            assertEquals("No Address or No Phone", ((CorrectionRequest) row.get("$correction")).getError().getMessage());
        }
       
        ksession.insert(new Address(person.getId(), "7th", 123, "92013"));
        // I've already fix the problem
        results =
                ksession.getQueryResults("getAllCorrectionRequest", new Object[]{});
        assertEquals(0, results.size());
       
View Full Code Here

TOP

Related Classes of org.plugtree.training.simplevalidation.model.Address

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.