Package com.consol.citrus.actions

Examples of com.consol.citrus.actions.SleepAction


        Template rootTemplate = new Template();
        rootTemplate.setName("fooTemplate");
       
        List<TestAction> actions = new ArrayList<TestAction>();
        actions.add(new EchoAction());
        actions.add(new SleepAction());
        rootTemplate.setActions(actions);
       
        reset(applicationContextMock);

        expect(applicationContextMock.getBean("fooTemplate", Template.class)).andReturn(rootTemplate).once();
View Full Code Here


       
        Assert.assertEquals(builder.testCase().getActions().size(), 2);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), SleepAction.class);
        Assert.assertEquals(builder.testCase().getActions().get(1).getClass(), SleepAction.class);
       
        SleepAction action = (SleepAction)builder.testCase().getActions().get(0);
        Assert.assertEquals(action.getName(), "sleep");
        Assert.assertEquals(action.getSeconds(), "0.5");
        Assert.assertEquals(action.getMilliseconds(), "5000");

        action = (SleepAction)builder.testCase().getActions().get(1);
        Assert.assertEquals(action.getName(), "sleep");
        Assert.assertNull(action.getSeconds());
        Assert.assertEquals(action.getMilliseconds(), "500");
    }
View Full Code Here

    @Test
    public void testSleepActionParser() {
        assertActionCount(4);
        assertActionClassAndName(SleepAction.class, "sleep");

        SleepAction action = getNextTestActionFromTest();
        Assert.assertNull(action.getSeconds());
        Assert.assertEquals(action.getMilliseconds(), "5000");

        action = getNextTestActionFromTest();
        Assert.assertEquals(action.getSeconds(), "1.5");
        Assert.assertEquals(action.getMilliseconds(), "5000");

        action = getNextTestActionFromTest();
        Assert.assertEquals(action.getSeconds(), "1.5");
        Assert.assertEquals(action.getMilliseconds(), "5000");

        action = getNextTestActionFromTest();
        Assert.assertNull(action.getSeconds());
        Assert.assertEquals(action.getMilliseconds(), "1500");
    }
View Full Code Here

TOP

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

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.