Package org.apache.commons.scxml.model

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


     */
    public static void serializeHistory(final StringBuffer b, final List l,
            final String indent) {
        if (l.size() > 0) {
            for (int i = 0; i < l.size(); i++) {
                History h = (History) l.get(i);
                b.append(indent).append("<history");
                serializeTransitionTargetAttributes(b, h);
                 if (h.isDeep()) {
                     b.append(" type=\"deep\"");
                 } else {
                     b.append(" type=\"shallow\"");
                 }
                b.append(">\n");
                serializeTransition(b, h.getTransition(), indent + INDENT);
                b.append(indent).append("</history>\n");
            }
        }
    }
View Full Code Here


        assertEquals("value", instance.getContext(target).get("name"));
        assertEquals("value", instance.lookupContext(target).get("name"));
    }

    public void testGetLastConfigurationNull() {
        History history = new History();
       
        Set returnConfiguration = instance.getLastConfiguration(history);
       
        assertEquals(0, returnConfiguration.size());
    }
View Full Code Here

        assertEquals(0, returnConfiguration.size());
    }


    public void testGetLastConfiguration() {
        History history = new History();
        history.setId("1");
       
        Set configuration = new HashSet();
        configuration.add("value1");
        configuration.add("value2");
       
View Full Code Here

        assertTrue(returnConfiguration.contains("value1"));
        assertTrue(returnConfiguration.contains("value2"));
    }
   
    public void testIsEmpty() {
        assertTrue(instance.isEmpty(new History()));
    }
View Full Code Here

    public void testIsEmpty() {
        assertTrue(instance.isEmpty(new History()));
    }
   
    public void testIsEmptyFalse() {
        History history = new History();
        history.setId("1");
       
        Set configuration = new HashSet();
        configuration.add("value1");
        configuration.add("value2");
       
View Full Code Here

        assertFalse(instance.isEmpty(history));
    }
   
    public void testReset() {
        History history = new History();
        history.setId("1");
       
        Set configuration = new HashSet();
        configuration.add("value1");
        configuration.add("value2");
       
View Full Code Here

TOP

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

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.