Package com.consol.citrus.actions

Examples of com.consol.citrus.actions.CreateVariablesAction


       
        Assert.assertEquals(builder.testCase().getActions().size(), 2);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), CreateVariablesAction.class);
        Assert.assertEquals(builder.testCase().getActions().get(1).getClass(), CreateVariablesAction.class);

        CreateVariablesAction action = (CreateVariablesAction)builder.testCase().getActions().get(0);
        Assert.assertEquals(action.getName(), "create-variables");
        Assert.assertEquals(action.getVariables().toString(), "{foo=bar, text=Hello Citrus!}");

        action = (CreateVariablesAction)builder.testCase().getActions().get(1);
        Assert.assertEquals(action.getName(), "create-variables");
        Assert.assertEquals(action.getVariables().toString(), "{foobar=bars}");
    }
View Full Code Here


        globalVariables.getVariables().put("defaultVar", "123");
       
        TestCase testcase = new TestCase();
        testcase.setName("MyTestCase");
       
        CreateVariablesAction varSetting = new CreateVariablesAction();
        varSetting.setVariables(Collections.singletonMap("defaultVar", "ABC"));
        testcase.addTestAction(varSetting);

        TestContext testContext = createTestContext();
        testcase.execute(testContext);
       
View Full Code Here

    @Test
    public void testCreateVariablesActionParser() {
        assertActionCount(1);
        assertActionClassAndName(CreateVariablesAction.class, "create-variables");
       
        CreateVariablesAction action = getNextTestActionFromTest();
        Assert.assertEquals(action.getVariables().size(), 2);
        Assert.assertEquals(action.getVariables().get("text"), "Hello");
        Assert.assertEquals(action.getVariables().get("sum"), "script:<groovy>(1+2+3+4+5)");
    }
View Full Code Here

TOP

Related Classes of com.consol.citrus.actions.CreateVariablesAction

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.