Package hu.sztaki.ilab.longneck.process.constraint

Examples of hu.sztaki.ilab.longneck.process.constraint.When


        Document doc = nonValidatingDocumentBuilder.parse(classLoader.getResourceAsStream("unmarshal/when.xml"));
       
        Object whenObj = unmarshaller.unmarshal(doc);       
        Assert.assertTrue(whenObj instanceof When);
       
        When w = (When) whenObj;
       
        Assert.assertNotNull(w.getConstraints());
        Assert.assertEquals(1, w.getConstraints().size());
        Assert.assertTrue(w.getConstraints().get(0) instanceof IsNullConstraint);
        Assert.assertTrue(((IsNullConstraint) w.getConstraints().get(0)).getApplyTo().get(0).equals("a"));
       
        Assert.assertNotNull(w.getThenConstraints());
        Assert.assertEquals(1, w.getThenConstraints().size());
        Assert.assertTrue(w.getThenConstraints().get(0) instanceof IsNullConstraint);
        Assert.assertTrue(((IsNullConstraint) w.getThenConstraints().get(0)).getApplyTo().get(0).equals("b"));
       
        Assert.assertNotNull(w.getElseConstraints());
        Assert.assertEquals(1, w.getElseConstraints().size());
        Assert.assertTrue(w.getElseConstraints().get(0) instanceof IsNullConstraint);
        Assert.assertTrue(((IsNullConstraint) w.getElseConstraints().get(0)).getApplyTo().get(0).equals("c"));
       
    }
View Full Code Here

TOP

Related Classes of hu.sztaki.ilab.longneck.process.constraint.When

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.