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

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


        seq.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 1, 1, 0));
        far.put(seq);
        If ifBlock = new If();
        seq.setBlocks(Arrays.asList(new Block[] { ifBlock }));
       
        EqualsConstraint equals = new EqualsConstraint();
        equals.setApplyTo("a");
        equals.setValue("aaa");
        ifBlock.setConstraints(Arrays.asList(new Constraint[] { equals }));
       
        Sequence thenBranch = new Sequence();
        thenBranch.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 2, 2, 0));
        far.put(thenBranch);
View Full Code Here


        // Case 1 check
        Check c1check = new Check();
        c1check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 4, 4, 0));
        far.put(c1check);
       
        EqualsConstraint c1equals = new EqualsConstraint();
        c1equals.setApplyTo("a");
        c1equals.setValue("aaa");
        c1check.setConstraints(Arrays.asList(new Constraint[] { c1equals }));
       
        // Case 1 block
        Set c1set = new Set();
        c1set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 5, 5, 0));
        far.put(c1set);
        c1set.setApplyTo("b");
        c1set.setValue("case1");       
       
        Set c1set2 = new Set();
        c1set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 6, 6, 0));
        far.put(c1set2);
        c1set2.setApplyTo("c1");
        c1set2.setValue("case1");
       
        c1.setBlocks(Arrays.asList(new Block[] { c1check, c1set, c1set2 }));
       
       
        // Case 2
        Case c2 = new Case();
        c2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 7, 7, 0));
        far.put(c2);
       
        // Case 2 check
        Check c2check = new Check();
        c2check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 8, 8, 0));
        far.put(c2check);
       
        EqualsConstraint c2equals = new EqualsConstraint();
        c2equals.setApplyTo("a");
        c2equals.setValue("bbb");
        c2check.setConstraints(Arrays.asList(new Constraint[] { c2equals }));
       
        // Case 2 block
        Set c2set = new Set();
        c2set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 9, 9, 0));
        far.put(c2set);
        c2set.setApplyTo("b");
        c2set.setValue("case2");
       
        Set c2set2 = new Set();
        c2set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 10, 10, 0));
        far.put(c2set2);
        c2set2.setApplyTo("c2");
        c2set2.setValue("case2");
       
        c2.setBlocks(Arrays.asList(new Block[] { c2check, c2set, c2set2 }));

       
        // Case 3
        Case c3 = new Case();
        c3.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 11, 11, 0));
        far.put(c1);
       
        // Case 3 check
        Check c3check = new Check();
        c3check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 12, 12, 0));
        far.put(c3check);
       
        EqualsConstraint c3equals = new EqualsConstraint();
        c3equals.setApplyTo("a");
        c3equals.setValue("ccc");
        c3check.setConstraints(Arrays.asList(new Constraint[] { c3equals }));
       
        // Case 3 block
        Set c3set = new Set();
        c3set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 13, 13, 0));
View Full Code Here

        // Case 1 check
        Check c1check = new Check();
        c1check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 4, 4, 0));
        far.put(c1check);
       
        EqualsConstraint c1equals = new EqualsConstraint();
        c1equals.setApplyTo("a");
        c1equals.setValue("aaa");
        c1check.setConstraints(Arrays.asList(new Constraint[] { c1equals }));
       
        // Case 1 block
        Set c1set = new Set();
        c1set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 5, 5, 0));
        far.put(c1set);
        c1set.setApplyTo("b");
        c1set.setValue("case1");       
       
        Set c1set2 = new Set();
        c1set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 6, 6, 0));
        far.put(c1set2);
        c1set2.setApplyTo("c1");
        c1set2.setValue("case1");
       
        c1.setBlocks(Arrays.asList(new Block[] { c1check, c1set, c1set2 }));
       
       
        // Case 2
        Case c2 = new Case();
        c2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 7, 7, 0));
        far.put(c2);
       
        // Case 2 check
        Check c2check = new Check();
        c2check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 8, 8, 0));
        far.put(c2check);
       
        EqualsConstraint c2equals = new EqualsConstraint();
        c2equals.setApplyTo("a");
        c2equals.setValue("bbb");
        c2check.setConstraints(Arrays.asList(new Constraint[] { c2equals }));
       
        // Case 2 block
        Set c2set = new Set();
        c2set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 9, 9, 0));
        far.put(c2set);
        c2set.setApplyTo("b");
        c2set.setValue("case2");
       
        Set c2set2 = new Set();
        c2set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 10, 10, 0));
        far.put(c2set2);
        c2set2.setApplyTo("c2");
        c2set2.setValue("case2");
       
        c2.setBlocks(Arrays.asList(new Block[] { c2check, c2set, c2set2 }));

       
        // Case 3
        Case c3 = new Case();
        c3.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 11, 11, 0));
        far.put(c1);
       
        // Case 3 check
        Check c3check = new Check();
        c3check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 12, 12, 0));
        far.put(c3check);
       
        EqualsConstraint c3equals = new EqualsConstraint();
        c3equals.setApplyTo("a");
        c3equals.setValue("ccc");
        c3check.setConstraints(Arrays.asList(new Constraint[] { c3equals }));
       
        // Case 3 block
        Set c3set = new Set();
        c3set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 13, 13, 0));
View Full Code Here

        // Case 1 check
        Check c1check = new Check();
        c1check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 4, 4, 0));
        far.put(c1check);
       
        EqualsConstraint c1equals = new EqualsConstraint();
        c1equals.setApplyTo("a");
        c1equals.setValue("aaa");
        c1check.setConstraints(Arrays.asList(new Constraint[] { c1equals }));
       
        // Case 1 block
        Set c1set = new Set();
        c1set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 5, 5, 0));
        far.put(c1set);
        c1set.setApplyTo("b");
        c1set.setValue("case1");       
       
        Set c1set2 = new Set();
        c1set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 6, 6, 0));
        far.put(c1set2);
        c1set2.setApplyTo("c1");
        c1set2.setValue("case1");
       
        c1.setBlocks(Arrays.asList(new Block[] { c1check, c1set, c1set2 }));
       
       
        // Case 2
        Case c2 = new Case();
        c2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 7, 7, 0));
        far.put(c2);
       
        // Case 2 check
        Check c2check = new Check();
        c2check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 8, 8, 0));
        far.put(c2check);
       
        EqualsConstraint c2equals = new EqualsConstraint();
        c2equals.setApplyTo("a");
        c2equals.setValue("bbb");
        c2check.setConstraints(Arrays.asList(new Constraint[] { c2equals }));
       
        // Case 2 block
        Set c2set = new Set();
        c2set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 9, 9, 0));
View Full Code Here

       
        Check b2check = new Check();
        b2check.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 6, 6, 0));
        far.put(b2check);
       
        EqualsConstraint equals = new EqualsConstraint();
        equals.setApplyTo("a");
        equals.setValue("xxx");
        b2check.setConstraints(Arrays.asList(new Constraint[] { equals }));
       
        Set b2set = new Set();
        b2set.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 6, 6, 0));
        far.put(b2set);
View Full Code Here

       
        Check b2check = new Check();
        b2check.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 6, 6, 0));
        far.put(b2check);
       
        EqualsConstraint equals = new EqualsConstraint();
        equals.setApplyTo("a");
        equals.setValue("xxx");
        b2check.setConstraints(Arrays.asList(new Constraint[] { equals }));
       
        Set b2set = new Set();
        b2set.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 7, 7, 0));
        far.put(b2set);
View Full Code Here

       
        // Unmarshal document
        LongneckProcess process = (LongneckProcess) unmarshaller.unmarshal(doc);
       
        Assert.assertTrue((((If) process.getBlocks().get(0)).getCondition().getConstraints().get(0) instanceof EqualsConstraint));       
        EqualsConstraint testedEquals = (EqualsConstraint) ((If) process.getBlocks().get(0)).getCondition().getConstraints().get(0);
       
        Assert.assertEquals("", testedEquals.getValue());
    }
View Full Code Here

       
        // Unmarshal document
        LongneckProcess process = (LongneckProcess) unmarshaller.unmarshal(doc);
       
        Assert.assertTrue((((If) process.getBlocks().get(0)).getCondition().getConstraints().get(1) instanceof EqualsConstraint));       
        EqualsConstraint testedEquals = (EqualsConstraint) ((If) process.getBlocks().get(0)).getCondition().getConstraints().get(1);
       
        Assert.assertEquals("some value", testedEquals.getValue());
    }
View Full Code Here

       
        // Unmarshal document
        LongneckProcess process = (LongneckProcess) unmarshaller.unmarshal(doc);
       
        Assert.assertTrue((((If) process.getBlocks().get(0)).getCondition().getConstraints().get(2) instanceof EqualsConstraint));       
        EqualsConstraint testedEquals = (EqualsConstraint) ((If) process.getBlocks().get(0)).getCondition().getConstraints().get(2);
       
        Assert.assertEquals("a", testedEquals.getWith());
    }   
View Full Code Here

TOP

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

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.