Package com.consol.citrus.ws.actions

Examples of com.consol.citrus.ws.actions.AssertSoapFault


    public void testAssertSoapFaultParser() {
        assertActionCount(7);
        assertActionClassAndName(AssertSoapFault.class, "soap-fault");
       
        // 1st action
        AssertSoapFault action = getNextTestActionFromTest();
        Assert.assertNotNull(action.getAction());
        Assert.assertEquals(action.getValidator(), beanDefinitionContext.getBean("soapFaultValidator"));
        Assert.assertEquals(action.getFaultCode(), "{http://www.citrusframework.org/faults}FAULT-1001");
        Assert.assertNull(action.getFaultString());
        Assert.assertEquals(action.getFaultDetails().size(), 0L);
        Assert.assertNull(action.getValidationContext());
       
        // 2nd action
        action = getNextTestActionFromTest();
        Assert.assertNotNull(action.getAction());
        Assert.assertEquals(action.getValidator(), beanDefinitionContext.getBean("soapFaultValidator"));
        Assert.assertEquals(action.getFaultCode(), "{http://www.citrusframework.org/faults}FAULT-1002");
        Assert.assertEquals(action.getFaultString(), "FaultString");
        Assert.assertEquals(action.getFaultDetails().size(), 0L);
        Assert.assertNull(action.getValidationContext());
       
        // 3rd action
        action = getNextTestActionFromTest();
        Assert.assertNotNull(action.getAction());
        Assert.assertEquals(action.getValidator(), beanDefinitionContext.getBean("soapFaultValidator"));
        Assert.assertEquals(action.getFaultCode(), "{http://www.citrusframework.org/faults}FAULT-1003");
        Assert.assertEquals(action.getFaultString(), "FaultString");
        Assert.assertEquals(action.getFaultActor(), "FaultActor");
        Assert.assertEquals(action.getFaultDetails().size(), 1L);
        Assert.assertEquals(action.getFaultDetails().get(0), "FaultDetail");
        Assert.assertEquals(((SoapFaultDetailValidationContext)action.getValidationContext()).getValidationContexts().size(), 1L);
       
        // 4th action
        action = getNextTestActionFromTest();
        Assert.assertNotNull(action.getAction());
        Assert.assertEquals(action.getValidator(), beanDefinitionContext.getBean("customSoapFaultValidator"));
        Assert.assertEquals(action.getFaultCode(), "{http://www.citrusframework.org/faults}FAULT-1004");
        Assert.assertEquals(action.getFaultString(), "FaultString");
        Assert.assertEquals(action.getFaultDetails().size(), 0L);
        Assert.assertEquals(action.getFaultDetailResourcePaths().size(), 1L);
        Assert.assertEquals(action.getFaultDetailResourcePaths().get(0), "classpath:com/consol/citrus/ws/actions/test-fault-detail.xml");
        Assert.assertEquals(((SoapFaultDetailValidationContext)action.getValidationContext()).getValidationContexts().size(), 1L);
       
        // 5th action
        action = getNextTestActionFromTest();
        Assert.assertNotNull(action.getAction());
        Assert.assertEquals(action.getValidator(), beanDefinitionContext.getBean("soapFaultValidator"));
        Assert.assertEquals(action.getFaultCode(), "{http://www.citrusframework.org/faults}FAULT-1003");
        Assert.assertEquals(action.getFaultString(), "FaultString");
        Assert.assertEquals(action.getFaultActor(), "FaultActor");
        Assert.assertEquals(action.getFaultDetails().size(), 1L);
        Assert.assertEquals(action.getFaultDetails().get(0), "FaultDetail");
       
        Assert.assertEquals(((SoapFaultDetailValidationContext)action.getValidationContext()).getValidationContexts().size(), 1L);
       
        ValidationContext xmlValidationContext = ((SoapFaultDetailValidationContext)action.getValidationContext()).getValidationContexts().get(0);
        Assert.assertTrue(xmlValidationContext instanceof XmlMessageValidationContext);
        Assert.assertTrue(((XmlMessageValidationContext)xmlValidationContext).isSchemaValidationEnabled());
        Assert.assertEquals(((XmlMessageValidationContext)xmlValidationContext).getSchemaRepository(), "fooSchemaRepository");
        Assert.assertNull(((XmlMessageValidationContext)xmlValidationContext).getSchema());
       
        // 6th action
        action = getNextTestActionFromTest();
        Assert.assertNotNull(action.getAction());
        Assert.assertEquals(action.getValidator(), beanDefinitionContext.getBean("soapFaultValidator"));
        Assert.assertEquals(action.getFaultCode(), "{http://www.citrusframework.org/faults}FAULT-1003");
        Assert.assertEquals(action.getFaultString(), "FaultString");
        Assert.assertEquals(action.getFaultActor(), "FaultActor");
        Assert.assertEquals(action.getFaultDetails().size(), 1L);
        Assert.assertEquals(action.getFaultDetails().get(0), "FaultDetail");
        Assert.assertEquals(((SoapFaultDetailValidationContext)action.getValidationContext()).getValidationContexts().size(), 1L);
       
        xmlValidationContext = ((SoapFaultDetailValidationContext)action.getValidationContext()).getValidationContexts().get(0);
        Assert.assertTrue(xmlValidationContext instanceof XmlMessageValidationContext);
        Assert.assertTrue(((XmlMessageValidationContext)xmlValidationContext).isSchemaValidationEnabled());
        Assert.assertNull(((XmlMessageValidationContext)xmlValidationContext).getSchemaRepository());
        Assert.assertEquals(((XmlMessageValidationContext)xmlValidationContext).getSchema(), "fooSchema");
       
        // 7th action
        action = getNextTestActionFromTest();
        Assert.assertNotNull(action.getAction());
        Assert.assertEquals(action.getValidator(), beanDefinitionContext.getBean("soapFaultValidator"));
        Assert.assertEquals(action.getFaultCode(), "{http://www.citrusframework.org/faults}FAULT-1003");
        Assert.assertEquals(action.getFaultString(), "FaultString");
        Assert.assertEquals(action.getFaultActor(), "FaultActor");
        Assert.assertEquals(action.getFaultDetails().size(), 1L);
        Assert.assertEquals(action.getFaultDetails().get(0), "FaultDetail");
        Assert.assertEquals(((SoapFaultDetailValidationContext)action.getValidationContext()).getValidationContexts().size(), 1L);
       
        xmlValidationContext = ((SoapFaultDetailValidationContext)action.getValidationContext()).getValidationContexts().get(0);
        Assert.assertTrue(xmlValidationContext instanceof XmlMessageValidationContext);
        Assert.assertFalse(((XmlMessageValidationContext)xmlValidationContext).isSchemaValidationEnabled());
        Assert.assertNull(((XmlMessageValidationContext)xmlValidationContext).getSchemaRepository());
        Assert.assertNull(((XmlMessageValidationContext)xmlValidationContext).getSchema());
    }
View Full Code Here


       
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), AssertSoapFault.class);
        Assert.assertEquals(builder.testCase().getActions().get(0).getName(), "soap-fault");
       
        AssertSoapFault container = (AssertSoapFault)(builder.testCase().getTestAction(0));
       
        Assert.assertEquals(container.getActions().size(), 1);
        Assert.assertEquals(container.getAction().getClass(), EchoAction.class);
        Assert.assertEquals(container.getFaultCode(), "SOAP-ENV:Server");
        Assert.assertEquals(container.getFaultString(), "Internal server error");
        Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");
       
        verify(applicationContextMock);
    }
View Full Code Here

       
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), AssertSoapFault.class);
        Assert.assertEquals(builder.testCase().getActions().get(0).getName(), "soap-fault");
       
        AssertSoapFault container = (AssertSoapFault)(builder.testCase().getTestAction(0));
       
        Assert.assertEquals(container.getActions().size(), 1);
        Assert.assertEquals(container.getAction().getClass(), EchoAction.class);
        Assert.assertEquals(container.getFaultCode(), "SOAP-ENV:Server");
        Assert.assertEquals(container.getFaultString(), "Internal server error");
        Assert.assertEquals(container.getFaultDetails().size(), 1L);
        Assert.assertEquals(container.getFaultDetails().get(0), "<ErrorDetail><message>FooBar</message></ErrorDetail>");
        Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");
       
        verify(applicationContextMock);
    }
View Full Code Here

       
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), AssertSoapFault.class);
        Assert.assertEquals(builder.testCase().getActions().get(0).getName(), "soap-fault");
       
        AssertSoapFault container = (AssertSoapFault)(builder.testCase().getTestAction(0));
       
        Assert.assertEquals(container.getActions().size(), 1);
        Assert.assertEquals(container.getAction().getClass(), EchoAction.class);
        Assert.assertEquals(container.getFaultCode(), "SOAP-ENV:Server");
        Assert.assertEquals(container.getFaultString(), "Internal server error");
        Assert.assertEquals(container.getFaultDetails().size(), 2L);
        Assert.assertEquals(container.getFaultDetails().get(0), "<ErrorDetail><code>1001</code></ErrorDetail>");
        Assert.assertEquals(container.getFaultDetails().get(1), "<MessageDetail><message>FooBar</message></MessageDetail>");
        Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");
       
        verify(applicationContextMock);
    }
View Full Code Here

       
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), AssertSoapFault.class);
        Assert.assertEquals(builder.testCase().getActions().get(0).getName(), "soap-fault");
       
        AssertSoapFault container = (AssertSoapFault)(builder.testCase().getTestAction(0));
       
        Assert.assertEquals(container.getActions().size(), 1);
        Assert.assertEquals(container.getAction().getClass(), EchoAction.class);
        Assert.assertEquals(container.getFaultCode(), "SOAP-ENV:Server");
        Assert.assertEquals(container.getFaultString(), "Internal server error");
        Assert.assertEquals(container.getFaultDetails().size(), 1L);
        Assert.assertEquals(container.getFaultDetails().get(0), "<ErrorDetail><message>FooBar</message</ErrorDetail>");
        Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");
       
        verify(resource, applicationContextMock);
    }
View Full Code Here

        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), AssertSoapFault.class);
        Assert.assertEquals(builder.testCase().getActions().get(0).getName(), "soap-fault");

        AssertSoapFault container = (AssertSoapFault)(builder.testCase().getTestAction(0));

        Assert.assertEquals(container.getActions().size(), 1);
        Assert.assertEquals(container.getAction().getClass(), EchoAction.class);
        Assert.assertEquals(container.getFaultCode(), "SOAP-ENV:Server");
        Assert.assertEquals(container.getFaultString(), "Internal server error");
        Assert.assertEquals(container.getFaultDetails().size(), 0L);
        Assert.assertEquals(container.getFaultDetailResourcePaths().size(), 1L);
        Assert.assertEquals(container.getFaultDetailResourcePaths().get(0), "com/consol/citrus/soap/fault.xml");
        Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");

        verify(applicationContextMock);
    }
View Full Code Here

       
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), AssertSoapFault.class);
        Assert.assertEquals(builder.testCase().getActions().get(0).getName(), "soap-fault");
       
        AssertSoapFault container = (AssertSoapFault)(builder.testCase().getTestAction(0));
       
        Assert.assertEquals(container.getActions().size(), 1);
        Assert.assertEquals(container.getAction().getClass(), EchoAction.class);
        Assert.assertEquals(container.getFaultCode(), "SOAP-ENV:Server");
        Assert.assertEquals(container.getFaultString(), "Internal server error");
        Assert.assertEquals(container.getFaultDetails().size(), 2L);
        Assert.assertEquals(container.getFaultDetails().get(0), "<ErrorDetail><code>1001</code></ErrorDetail>");
        Assert.assertEquals(container.getFaultDetails().get(1), "<MessageDetail><message>FooBar</message></MessageDetail>");
        Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");
       
        verify(resource, applicationContextMock);
    }
View Full Code Here

       
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), AssertSoapFault.class);
        Assert.assertEquals(builder.testCase().getActions().get(0).getName(), "soap-fault");
       
        AssertSoapFault container = (AssertSoapFault)(builder.testCase().getTestAction(0));
       
        Assert.assertEquals(container.getActions().size(), 1);
        Assert.assertEquals(container.getAction().getClass(), EchoAction.class);
        Assert.assertEquals(container.getFaultCode(), "SOAP-ENV:Server");
        Assert.assertEquals(container.getFaultString(), "Internal server error");
        Assert.assertEquals(container.getValidator(), soapFaultValidator);
        Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");
       
        verify(applicationContextMock);
    }
View Full Code Here

       
        Assert.assertEquals(builder.testCase().getActions().size(), 1);
        Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), AssertSoapFault.class);
        Assert.assertEquals(builder.testCase().getActions().get(0).getName(), "soap-fault");
       
        AssertSoapFault container = (AssertSoapFault)(builder.testCase().getTestAction(0));
       
        Assert.assertEquals(container.getActions().size(), 1);
        Assert.assertEquals(container.getAction().getClass(), EchoAction.class);
        Assert.assertEquals(container.getFaultCode(), "SOAP-ENV:Server");
        Assert.assertEquals(container.getFaultString(), "Internal server error");
        Assert.assertEquals(container.getFaultActor(), "MyActor");
        Assert.assertEquals(((EchoAction)(container.getAction())).getMessage(), "${foo}");
       
        verify(applicationContextMock);
    }
View Full Code Here

TOP

Related Classes of com.consol.citrus.ws.actions.AssertSoapFault

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.