Package com.consol.citrus.actions

Examples of com.consol.citrus.actions.EchoAction


        testSuiteListener.onStartSuccess();
        expectLastCall().once();
       
        replay(testSuiteListener);
       
        beforeActions.addTestAction(new EchoAction());
       
        beforeActions.execute(createTestContext());
       
        verify(testSuiteListener);
    }
View Full Code Here


        testSuiteListener.onFinishSuccess();
        expectLastCall().once();
       
        replay(testSuiteListener);
       
        afterActions.addTestAction(new EchoAction());
       
        afterActions.execute(createTestContext());
       
        verify(testSuiteListener);
    }
View Full Code Here

   
    @Test
    public void testBeforeTest() {
        SequenceBeforeTest beforeTestActions = new SequenceBeforeTest();
       
        beforeTestActions.addTestAction(new EchoAction());
       
        beforeTestActions.execute(createTestContext());
    }
View Full Code Here

    @Test
    public void testExecution() {
        TestCase testcase = new TestCase();
        testcase.setName("MyTestCase");
       
        testcase.addTestAction(new EchoAction());
       
        testcase.execute(context);
    }
View Full Code Here

    @Test
    public void testFinallyChain() {
        TestCase testcase = new TestCase();
        testcase.setName("MyTestCase");
       
        testcase.addTestAction(new EchoAction());
        testcase.addFinallyChainAction(new EchoAction());
       
        testcase.execute(context);
    }
View Full Code Here

    public void testTemplateBuilder() {
        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);
View Full Code Here

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

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

        builder.execute();
       
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), EchoAction.class);
       
        EchoAction action = (EchoAction)builder.testCase().getActions().get(0);
        Assert.assertEquals(action.getName(), "echo");
        Assert.assertEquals(action.getMessage(), "Hello Citrus!");
    }
View Full Code Here

        methodArgs.add(new TestContext());
       
        MockBuilder builder = new MockBuilder(applicationContext) {
            @Override
            public void configure() {
                java(new EchoAction())
                      .methodArgs(methodArgs)
                      .method("execute");
            }
        };
       
View Full Code Here

    @Test
    public void testEchoActionParser() {
        assertActionCount(1);
        assertActionClassAndName(EchoAction.class, "echo");
       
        EchoAction action = getNextTestActionFromTest();
        Assert.assertEquals(action.getDescription(), "This action prints messages to console logger");
        Assert.assertEquals(action.getMessage(), "This is a test!");
    }
View Full Code Here

TOP

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

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.