Package com.consol.citrus.actions

Examples of com.consol.citrus.actions.FailAction


       
       
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), FailAction.class);
       
        FailAction action = (FailAction)builder.testCase().getActions().get(0);
        Assert.assertEquals(action.getName(), "fail");
        Assert.assertEquals(action.getMessage(), "This test will fail.");
    }
View Full Code Here


        testSuiteListener.onStartFailure((Throwable)anyObject());
        expectLastCall().once();
       
        replay(testSuiteListener);
       
        beforeActions.addTestAction(new FailAction());
       
        try {
            beforeActions.execute(createTestContext());
        } catch (CitrusRuntimeException e) {
            verify(testSuiteListener);
View Full Code Here

        afterSuiteAction.execute((TestContext)anyObject());
        expectLastCall().once();
       
        replay(testSuiteListener, afterSuiteAction);
       
        beforeActions.addTestAction(new FailAction());
       
        try {
            beforeActions.execute(createTestContext());
        } catch (CitrusRuntimeException e) {
            verify(testSuiteListener, afterSuiteAction);
View Full Code Here

        testSuiteListener.onFinishFailure((Throwable)anyObject());
        expectLastCall().once();
       
        replay(testSuiteListener);
       
        afterActions.addTestAction(new FailAction());
       
        try {
            afterActions.execute(createTestContext());
        } catch (CitrusRuntimeException e) {
            verify(testSuiteListener);
View Full Code Here

   
    @Test(expectedExceptions = CitrusRuntimeException.class)
    public void testBeforeTestFail() {
        SequenceBeforeTest beforeTestActions = new SequenceBeforeTest();
       
        beforeTestActions.addTestAction(new FailAction());
       
        beforeTestActions.execute(createTestContext());
    }
View Full Code Here

    @Test
    public void testFailActionParser() {
        assertActionCount(2);
        assertActionClassAndName(FailAction.class, "fail");
       
        FailAction action = getNextTestActionFromTest();
        Assert.assertEquals(action.getMessage(), "Something went wrong");
       
        action = getNextTestActionFromTest();
        Assert.assertEquals(action.getMessage(), "Generated error to interrupt test execution");
    }
View Full Code Here

        expectLastCall().times(4);
       
        replay(action);
       
        actions.add(action);
        actions.add(new FailAction());
       
        repeat.setActions(actions);
       
        repeat.setIndexName("i");
        repeat.setCondition("i = 5");
View Full Code Here

    @Test
    @SuppressWarnings({ "unchecked", "rawtypes" })
    public void testCatchDefaultException() {
        Catch catchAction = new Catch();
       
        List actionList = Collections.singletonList(new FailAction());
        catchAction.setActions(actionList);
       
        catchAction.execute(context);
    }
View Full Code Here

    @Test
    @SuppressWarnings({ "unchecked", "rawtypes" })
    public void testCatchException() {
        Catch catchAction = new Catch();
       
        List actionList = Collections.singletonList(new FailAction());
        catchAction.setActions(actionList);
       
        catchAction.setException("com.consol.citrus.exceptions.CitrusRuntimeException");
       
        catchAction.execute(context);
View Full Code Here

        expectLastCall().once();
       
        replay(action);
       
        List<TestAction> actionList = new ArrayList<TestAction>();
        actionList.add(new FailAction());
        actionList.add(action);
       
        catchAction.setActions(actionList);
       
        catchAction.setException("com.consol.citrus.exceptions.CitrusRuntimeException");
View Full Code Here

TOP

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

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.