Package com.consol.citrus.container

Examples of com.consol.citrus.container.RepeatOnErrorUntilTrue


       
        assertEquals(builder.testCase().getActions().size(), 2);
        assertEquals(builder.testCase().getActions().get(0).getClass(), RepeatOnErrorUntilTrue.class);
        assertEquals(builder.testCase().getActions().get(0).getName(), "repeat-on-error");
       
        RepeatOnErrorUntilTrue container = (RepeatOnErrorUntilTrue)builder.testCase().getActions().get(0);
        assertEquals(container.getActions().size(), 3);
        assertEquals(container.getAutoSleep(), Long.valueOf(2000L));
        assertEquals(container.getCondition(), "i gt 5");
        assertEquals(container.getIndex(), 1);
        assertEquals(container.getIndexName(), "i");
        assertEquals(container.getTestAction(0).getClass(), EchoAction.class);

        container = (RepeatOnErrorUntilTrue)builder.testCase().getActions().get(1);
        assertEquals(container.getActions().size(), 1);
        assertEquals(container.getAutoSleep(), Long.valueOf(200L));
        assertEquals(container.getCondition(), "k gt= 5");
        assertEquals(container.getIndex(), 2);
        assertEquals(container.getIndexName(), "k");
        assertEquals(container.getTestAction(0).getClass(), EchoAction.class);
    }
View Full Code Here


    @Test
    public void testRepeatOnErrorParser() {
        assertActionCount(4);
        assertActionClassAndName(RepeatOnErrorUntilTrue.class, "repeat-onerror-until-true");
       
        RepeatOnErrorUntilTrue action = getNextTestActionFromTest();
        Assert.assertEquals(action.getCondition(), "i gt 3");
        Assert.assertEquals(action.getIndexName(), "i");
        Assert.assertEquals(action.getIndex(), 1);
        Assert.assertEquals(action.getAutoSleep(), Long.valueOf(1000L));
        Assert.assertEquals(action.getActionCount(), 1);
       
        action = getNextTestActionFromTest();
        Assert.assertEquals(action.getCondition(), "index gt= 2");
        Assert.assertEquals(action.getIndexName(), "index");
        Assert.assertEquals(action.getIndex(), 1);
        Assert.assertEquals(action.getAutoSleep(), Long.valueOf(1000L));
        Assert.assertEquals(action.getActionCount(), 1);
       
        action = getNextTestActionFromTest();
        Assert.assertEquals(action.getCondition(), "i gt= 10");
        Assert.assertEquals(action.getIndexName(), "i");
        Assert.assertEquals(action.getIndex(), 1);
        Assert.assertEquals(action.getAutoSleep(), Long.valueOf(500L));
        Assert.assertEquals(action.getActionCount(), 2);

        action = getNextTestActionFromTest();
        Assert.assertEquals(action.getCondition(), "i gt= 5");
        Assert.assertEquals(action.getIndexName(), "i");
        Assert.assertEquals(action.getIndex(), 1);
        Assert.assertEquals(action.getAutoSleep(), Long.valueOf(250L));
        Assert.assertEquals(action.getActionCount(), 1);
    }
View Full Code Here

TOP

Related Classes of com.consol.citrus.container.RepeatOnErrorUntilTrue

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.