Package org.apache.commons.scxml.model

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


        assertFalse(returnBoolean);
        assertEquals(actualValue, returnValue.toString());
    }
   
    public void testSerializeActionsAssign() {
        Assign assign = new Assign();
        assign.setName("newName");
        assign.setExpr("newExpression");
       
        List values = new ArrayList();
        values.add(assign);
       
        String actualValue = " <assign name=\"newName\" expr=\"newExpression\"/>\n";
View Full Code Here


                Var v = (Var) a;
                b.append(indent).append("<var name=\"").append(v.getName())
                        .append("\" expr=\"").append(v.getExpr()).append(
                                "\"/>\n");
            } else if (a instanceof Assign) {
                Assign asn = (Assign) a;
                b.append(indent).append("<assign");
                if (!SCXMLHelper.isStringEmpty(asn.getLocation())) {
                    b.append(" location=\"").append(asn.getLocation());
                    if (!SCXMLHelper.isStringEmpty(asn.getSrc())) {
                        b.append("\" src=\"").append(asn.getSrc());
                    } else {
                        b.append("\" expr=\"").append(asn.getExpr());
                    }
                } else {
                    b.append(" name=\"").append(asn.getName()).
                        append("\" expr=\"").append(asn.getExpr());
                }
                b.append("\"/>\n");
            } else if (a instanceof Send) {
                serializeSend(b, (Send) a, indent);
            } else if (a instanceof Cancel) {
View Full Code Here

                b.append(indent).append("<cs:var name=\"").append(v.getName())
                    .append("\" expr=\"")
                    .append(SCXMLHelper.escapeXML(v.getExpr()))
                    .append("\"/>\n");
            } else if (a instanceof Assign) {
                Assign asn = (Assign) a;
                b.append(indent).append("<assign");
                if (!SCXMLHelper.isStringEmpty(asn.getLocation())) {
                    b.append(" location=\"").append(asn.getLocation());
                    if (!SCXMLHelper.isStringEmpty(asn.getSrc())) {
                        b.append("\" src=\"").append(asn.getSrc());
                    } else {
                        b.append("\" expr=\"").
                            append(SCXMLHelper.escapeXML(asn.getExpr()));
                    }
                } else {
                    b.append(" name=\"").append(asn.getName()).
                        append("\" expr=\"").
                        append(SCXMLHelper.escapeXML(asn.getExpr()));
                }
                b.append("\"/>\n");
            } else if (a instanceof Send) {
                serializeSend(b, (Send) a, indent);
            } else if (a instanceof Cancel) {
View Full Code Here

                Var v = (Var) a;
                b.append(indent).append("<var name=\"").append(v.getName())
                        .append("\" expr=\"").append(v.getExpr()).append(
                                "\"/>\n");
            } else if (a instanceof Assign) {
                Assign asn = (Assign) a;
                b.append(indent).append("<assign");
                if (!SCXMLHelper.isStringEmpty(asn.getLocation())) {
                    b.append(" location=\"").append(asn.getLocation());
                    if (!SCXMLHelper.isStringEmpty(asn.getSrc())) {
                        b.append("\" src=\"").append(asn.getSrc());
                    } else {
                        b.append("\" expr=\"").append(asn.getExpr());
                    }
                } else {
                    b.append(" name=\"").append(asn.getName()).
                        append("\" expr=\"").append(asn.getExpr());
                }
                b.append("\"/>\n");
            } else if (a instanceof Send) {
                serializeSend(b, (Send) a, indent);
            } else if (a instanceof Cancel) {
View Full Code Here

        assertFalse(returnBoolean);
        assertEquals(actualValue, returnValue.toString());
    }
   
    public void testSerializeActionsAssign() {
        Assign assign = new Assign();
        assign.setName("newName");
        assign.setExpr("newExpression");
       
        List values = new ArrayList();
        values.add(assign);
       
        String actualValue = " <assign name=\"newName\" expr=\"newExpression\"/>\n";
View Full Code Here

        assertFalse(returnBoolean);
        assertEquals(actualValue, returnValue.toString());
    }
   
    public void testSerializeActionsAssign() {
        Assign assign = new Assign();
        assign.setName("newName");
        assign.setExpr("newExpression");
       
        List values = new ArrayList();
        values.add(assign);
       
        String actualValue = " <assign name=\"newName\" expr=\"newExpression\"/>\n";
View Full Code Here

                Var v = (Var) a;
                b.append(indent).append("<var name=\"").append(v.getName())
                        .append("\" expr=\"").append(v.getExpr()).append(
                                "\"/>\n");
            } else if (a instanceof Assign) {
                Assign asn = (Assign) a;
                b.append(indent).append("<assign");
                if (!SCXMLHelper.isStringEmpty(asn.getLocation())) {
                    b.append(" location=\"").append(asn.getLocation());
                    if (!SCXMLHelper.isStringEmpty(asn.getSrc())) {
                        b.append("\" src=\"").append(asn.getSrc());
                    } else {
                        b.append("\" expr=\"").append(asn.getExpr());
                    }
                } else {
                    b.append(" name=\"").append(asn.getName()).
                        append("\" expr=\"").append(asn.getExpr());
                }
                b.append("\"/>\n");
            } else if (a instanceof Send) {
                serializeSend(b, (Send) a, indent);
            } else if (a instanceof Cancel) {
View Full Code Here

        assertFalse(returnBoolean);
        assertEquals(actualValue, returnValue.toString());
    }
   
    public void testSerializeActionsAssign() {
        Assign assign = new Assign();
        assign.setName("newName");
        assign.setExpr("newExpression");
       
        List values = new ArrayList();
        values.add(assign);
       
        String actualValue = " <assign name=\"newName\" expr=\"newExpression\"/>\n";
View Full Code Here

                Var v = (Var) a;
                b.append(indent).append("<var name=\"").append(v.getName())
                        .append("\" expr=\"").append(v.getExpr()).append(
                                "\"/>\n");
            } else if (a instanceof Assign) {
                Assign asn = (Assign) a;
                b.append(indent).append("<assign");
                if (!SCXMLHelper.isStringEmpty(asn.getLocation())) {
                    b.append(" location=\"").append(asn.getLocation());
                    if (!SCXMLHelper.isStringEmpty(asn.getSrc())) {
                        b.append("\" src=\"").append(asn.getSrc());
                    } else {
                        b.append("\" expr=\"").append(asn.getExpr());
                    }
                } else {
                    b.append(" name=\"").append(asn.getName()).
                        append("\" expr=\"").append(asn.getExpr());
                }
                b.append("\"/>\n");
            } else if (a instanceof Send) {
                serializeSend(b, (Send) a, indent);
            } else if (a instanceof Cancel) {
View Full Code Here

        assertFalse(returnBoolean);
        assertEquals(actualValue, returnValue.toString());
    }
   
    public void testSerializeActionsAssign() {
        Assign assign = new Assign();
        assign.setName("newName");
        assign.setExpr("newExpression");
       
        List values = new ArrayList();
        values.add(assign);
       
        String actualValue = " <assign name=\"newName\" expr=\"newExpression\"/>\n";
View Full Code Here

TOP

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

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.