Package org.apache.commons.scxml.model

Examples of org.apache.commons.scxml.model.TransitionTarget


       
        assertFalse(SCXMLHelper.isDescendant(state, context));
    }
   
    public void testIsDescendantEqual() {
        TransitionTarget state = new State();
        TransitionTarget context = new State();
        state.setParent(context);
       
        assertTrue(SCXMLHelper.isDescendant(state, context));
    }
View Full Code Here


       
        assertTrue(SCXMLHelper.isDescendant(state, context));
    }
   
    public void testIsDescendantParentEqual() {
        TransitionTarget state = new State();
        TransitionTarget context = new State();
        TransitionTarget parent = new State();

        parent.setParent(context);
        state.setParent(parent);
       
        assertTrue(SCXMLHelper.isDescendant(state, context));
    }
View Full Code Here

        assertEquals(0, returnValue.size());
    }
   
    public void testGetAncestorClosureUpperBoundNotNullAndContains() {
        Set states = new HashSet();
        TransitionTarget state = new State();
        state.setId("1");
        states.add(state);
       
        Set upperBounds = new HashSet();
        upperBounds.add(state);
       
View Full Code Here

        assertEquals("1", ((TransitionTarget)returnValue.toArray()[0]).getId());
    }
   
    public void testGetAncestorClosureContainsParent() {
        Set states = new HashSet();
        TransitionTarget state = new State();
        state.setId("1");
        state.setParent(state);
        states.add(state);
       
        Set upperBounds = new HashSet();
       
        Set returnValue = SCXMLHelper.getAncestorClosure(states, upperBounds);
View Full Code Here

        assertEquals(ErrorConstants.ILLEGAL_CONFIG, errorReporter.getErrCode());
        assertEquals("Multiple OR states active for state parentid", errorReporter.getErrDetail());
    }
   
    public void testGetLCASameTarget() {
        TransitionTarget target = new State();
        target.setId("1");
       
        TransitionTarget returnValue = SCXMLHelper.getLCA(target, target);
       
        assertEquals("1", returnValue.getId());
    }
View Full Code Here

       
        assertEquals("1", returnValue.getId());
    }

    public void testGetLCAIsDescendant() {
        TransitionTarget target = new State();
        target.setId("1");

        TransitionTarget parent = new State();
        parent.setId("2");

        target.setParent(parent);
       
        TransitionTarget returnValue = SCXMLHelper.getLCA(target, parent);
       
        assertEquals("2", returnValue.getId());
    }
View Full Code Here

       
        assertEquals("2", returnValue.getId());
    }
   
    public void testGetLCAIsDescendantReverse() {
        TransitionTarget target = new State();
        target.setId("1");

        TransitionTarget parent = new State();
        parent.setId("2");

        parent.setParent(target); // reversed
       
        TransitionTarget returnValue = SCXMLHelper.getLCA(target, parent);
       
        assertEquals("1", returnValue.getId());
    }
View Full Code Here

       
        assertEquals("1", returnValue.getId());
    }

    public void testGetLCANull() {
        TransitionTarget target = new State();
        target.setId("1");

        TransitionTarget notParent = new State();
        notParent.setId("2");

        TransitionTarget returnValue = SCXMLHelper.getLCA(target, notParent);
       
        assertNull(returnValue);
    }
View Full Code Here

       
        assertNull(returnValue);
    }

    public void testGetLCADistantAncestor() {
        TransitionTarget target1 = new State();
        target1.setId("1");

        TransitionTarget target2 = new State();
        target2.setId("2");

        TransitionTarget parent = new State();
        parent.setId("3");

        target1.setParent(parent);
        target2.setParent(parent);
       
        TransitionTarget returnValue = SCXMLHelper.getLCA(target1, target2);
       
        assertEquals("3", returnValue.getId());
    }
View Full Code Here

    public void setUp() {
        comparator = new TransitionTargetComparator();
    }
   
    public void testComparatorEquals() {
        TransitionTarget target = new State();
       
        assertEquals(0, comparator.compare(target, target));
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.scxml.model.TransitionTarget

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.