Package com.consol.citrus.actions

Examples of com.consol.citrus.actions.AbstractTestAction


    @Test
    public void testAssertBuilderWithAnonymousAction() {
        MockBuilder builder = new MockBuilder(applicationContext) {
            @Override
            public void configure() {
                assertException(new AbstractTestAction() {
                            @Override
                            public void doExecute(TestContext context) {
                                context.getVariable("foo");
                            }
                        })
View Full Code Here


        iterate(echo("index is: ${i}")).condition("i lt= 50").index("i")
                                       .startsWith(0)
                                       .step(5);

        AbstractTestAction anonymous = new AbstractTestAction() {
            @Override
            public void doExecute(TestContext context) {
                log.info(context.getVariable("index"));
            }
        };
View Full Code Here

                assertException(echo("Nothing fails here either"))
                    .exception(CitrusRuntimeException.class)
                    .message("Must be failing"))
                .exception(ValidationException.class);

        assertException(new AbstractTestAction() {
            @Override
            public void doExecute(TestContext context) {
                context.getVariable("foo");
            }
        }).exception(CitrusRuntimeException.class).message("Unknown variable 'foo'");
View Full Code Here

        variables.put("hello", "citrus:concat('Hello ', ${name}, '!')");
        variables.put("goodbye", "Goodbye ${name}!");
        variables.put("welcome", "Welcome ${name}, today is citrus:currentDate()!");
        testcase.setVariableDefinitions(variables);
       
        testcase.addTestAction(new AbstractTestAction() {
            @Override
            public void doExecute(TestContext context) {
                Assert.assertEquals(context.getVariables().get(CitrusConstants.TEST_NAME_VARIABLE), "MyTestCase");
                Assert.assertEquals(context.getVariables().get(CitrusConstants.TEST_PACKAGE_VARIABLE), TestCase.class.getPackage().getName());
                Assert.assertEquals(context.getVariable("${name}"), "Citrus");
View Full Code Here

        testcase.setName("MyTestCase");
       
        final String message = "Hello TestFramework!";
        testcase.setVariableDefinitions(Collections.singletonMap("text", message));
       
        testcase.addTestAction(new AbstractTestAction() {
            @Override
            public void doExecute(TestContext context) {
                Assert.assertEquals(context.getVariable("${unknown}"), message);
            }
        });
View Full Code Here

    @Test
    public void testAssertSoapFault() throws Exception {
        AssertSoapFault assertAction = new AssertSoapFault();
        assertAction.setValidator(soapFaultValidator);

        assertAction.setAction(new AbstractTestAction() {
            @Override
            public void doExecute(TestContext context) {
                SoapMessage faultMessage;
               
                faultMessage = messageFactory.createWebServiceMessage();
View Full Code Here

    @Test
    public void testAssertSoapFaultWithValidationMatchers() throws Exception {
        AssertSoapFault assertAction = new AssertSoapFault();
        assertAction.setValidator(soapFaultValidator);

        assertAction.setAction(new AbstractTestAction() {
            @Override
            public void doExecute(TestContext context) {
                SoapMessage faultMessage;
               
                faultMessage = messageFactory.createWebServiceMessage();
View Full Code Here

    @Test
    public void testNoPrefix() throws Exception {
        AssertSoapFault assertAction = new AssertSoapFault();
        assertAction.setValidator(soapFaultValidator);

        assertAction.setAction(new AbstractTestAction() {
            @Override
            public void doExecute(TestContext context) {
                SoapMessage faultMessage;
               
                faultMessage = messageFactory.createWebServiceMessage();
View Full Code Here

    @Test
    public void testWrongFaultCode() throws Exception {
        AssertSoapFault assertAction = new AssertSoapFault();
        assertAction.setValidator(soapFaultValidator);

        assertAction.setAction(new AbstractTestAction() {
            @Override
            public void doExecute(TestContext context) {
                SoapMessage faultMessage;
               
                faultMessage = messageFactory.createWebServiceMessage();
View Full Code Here

    @Test
    public void testWrongFaultActor() throws Exception {
        AssertSoapFault assertAction = new AssertSoapFault();
        assertAction.setValidator(soapFaultValidator);

        assertAction.setAction(new AbstractTestAction() {
            @Override
            public void doExecute(TestContext context) {
                SoapMessage faultMessage;

                faultMessage = messageFactory.createWebServiceMessage();
View Full Code Here

TOP

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

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.