Package org.apache.commons.scxml

Examples of org.apache.commons.scxml.SCXMLListener


        from = null;
        transition = null;
    }

    public void testAbstractSCXMLListener0() {
        SCXMLListener listener0 = new AbstractSCXMLListener() {
                /**
                 * @see SCXMLListener#onEntry(TransitionTarget)
                 */
                public void onEntry(TransitionTarget state) {
                    heardOnEntry = true;
                }

                /**
                 * @see SCXMLListener#onExit(TransitionTarget)
                 */
                public void onExit(TransitionTarget state) {
                    heardOnExit = true;
                }

                /**
                 * @see SCXMLListener#onTransition(TransitionTarget,TransitionTarget,Transition)
                 */
                public void onTransition(TransitionTarget from, TransitionTarget to,
                                         Transition transition) {
                    heardOnTransition = true;
                }
            };

        assertFalse("heardOnEntry == false", heardOnEntry);
        assertFalse("heardOnExit == false", heardOnExit);
        assertFalse("heardOnTransition == false", heardOnTransition);
        listener0.onEntry(to);
        listener0.onExit(to);
        listener0.onTransition(from, to, transition);
        assertTrue("heardOnEntry", heardOnEntry);
        assertTrue("heardOnExit", heardOnExit);
        assertTrue("heardOnExit", heardOnTransition);
    }
View Full Code Here


        assertTrue("heardOnExit", heardOnExit);
        assertTrue("heardOnExit", heardOnTransition);
    }

    public void testAbstractSCXMLListener1() {
        SCXMLListener listener1 = new AbstractSCXMLListener() {
                /**
                 * @see SCXMLListener#onEntry(TransitionTarget)
                 */
                public void onEntry(TransitionTarget state) {
                    heardOnEntry = true;
                }

                /**
                 * @see SCXMLListener#onExit(TransitionTarget)
                 */
                public void onExit(TransitionTarget state) {
                    heardOnExit = true;
                }
            };

        assertFalse("heardOnEntry == false", heardOnEntry);
        assertFalse("heardOnExit == false", heardOnExit);
        assertFalse("heardOnTransition == false", heardOnTransition);
        listener1.onEntry(to);
        listener1.onExit(to);
        listener1.onTransition(from, to, transition);
        assertTrue("heardOnEntry", heardOnEntry);
        assertTrue("heardOnExit", heardOnExit);
        assertFalse("heardOnTransition == false", heardOnTransition);
    }
View Full Code Here

        assertTrue("heardOnExit", heardOnExit);
        assertFalse("heardOnTransition == false", heardOnTransition);
    }

    public void testAbstractSCXMLListener2() {
        SCXMLListener listener2 = new AbstractSCXMLListener() {
                /**
                 * @see SCXMLListener#onEntry(TransitionTarget)
                 */
                public void onEntry(TransitionTarget state) {
                    heardOnEntry = true;
                }
            };

        assertFalse("heardOnEntry == false", heardOnEntry);
        assertFalse("heardOnExit == false", heardOnExit);
        assertFalse("heardOnTransition == false", heardOnTransition);
        listener2.onEntry(to);
        listener2.onExit(to);
        listener2.onTransition(from, to, transition);
        assertTrue("heardOnEntry", heardOnEntry);
        assertFalse("heardOnExit == false", heardOnExit);
        assertFalse("heardOnTransition == false", heardOnTransition);
    }
View Full Code Here

        assertFalse("heardOnExit == false", heardOnExit);
        assertFalse("heardOnTransition == false", heardOnTransition);
    }

    public void testAbstractSCXMLListener3() {
        SCXMLListener listener3 = new AbstractSCXMLListener() {
                // empty
            };

        assertFalse("heardOnEntry == false", heardOnEntry);
        assertFalse("heardOnExit == false", heardOnExit);
        assertFalse("heardOnTransition == false", heardOnTransition);
        listener3.onEntry(to);
        listener3.onExit(to);
        listener3.onTransition(from, to, transition);
        assertFalse("heardOnEntry == false", heardOnEntry);
        assertFalse("heardOnExit == false", heardOnExit);
        assertFalse("heardOnTransition == false", heardOnTransition);
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.scxml.SCXMLListener

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.