Package org.springframework.ws

Examples of org.springframework.ws.WebServiceMessage


    public void doesNotExistNonMatch() throws IOException, AssertionError {
        XPathExpectationsHelper helper = new XPathExpectationsHelper("//a");
        WebServiceMessageMatcher matcher = helper.doesNotExist();
        assertNotNull(matcher);

        WebServiceMessage message = createMock(WebServiceMessage.class);
        expect(message.getPayloadSource()).andReturn(new StringSource("<a><b/></a>")).times(2);

        replay(message);

        matcher.match(message);
    }
View Full Code Here


    public void evaluatesToTrueMatch() throws IOException, AssertionError {
        XPathExpectationsHelper helper = new XPathExpectationsHelper("//b=1");
        WebServiceMessageMatcher matcher = helper.evaluatesTo(true);
        assertNotNull(matcher);

        WebServiceMessage message = createMock(WebServiceMessage.class);
        expect(message.getPayloadSource()).andReturn(new StringSource("<a><b>1</b></a>")).times(2);

        replay(message);

        matcher.match(message);
View Full Code Here

    public void evaluatesToTrueNonMatch() throws IOException, AssertionError {
        XPathExpectationsHelper helper = new XPathExpectationsHelper("//b=2");
        WebServiceMessageMatcher matcher = helper.evaluatesTo(true);
        assertNotNull(matcher);

        WebServiceMessage message = createMock(WebServiceMessage.class);
        expect(message.getPayloadSource()).andReturn(new StringSource("<a><b>1</b></a>")).times(2);

        replay(message);

        matcher.match(message);
    }
View Full Code Here

    public void evaluatesToFalseMatch() throws IOException, AssertionError {
        XPathExpectationsHelper helper = new XPathExpectationsHelper("//b!=1");
        WebServiceMessageMatcher matcher = helper.evaluatesTo(false);
        assertNotNull(matcher);

        WebServiceMessage message = createMock(WebServiceMessage.class);
        expect(message.getPayloadSource()).andReturn(new StringSource("<a><b>1</b></a>")).times(2);

        replay(message);

        matcher.match(message);
View Full Code Here

    public void evaluatesToFalseNonMatch() throws IOException, AssertionError {
        XPathExpectationsHelper helper = new XPathExpectationsHelper("//b!=2");
        WebServiceMessageMatcher matcher = helper.evaluatesTo(false);
        assertNotNull(matcher);

        WebServiceMessage message = createMock(WebServiceMessage.class);
        expect(message.getPayloadSource()).andReturn(new StringSource("<a><b>1</b></a>")).times(2);

        replay(message);

        matcher.match(message);
    }
View Full Code Here

    public void evaluatesToIntegerMatch() throws IOException, AssertionError {
        XPathExpectationsHelper helper = new XPathExpectationsHelper("//b");
        WebServiceMessageMatcher matcher = helper.evaluatesTo(1);
        assertNotNull(matcher);

        WebServiceMessage message = createMock(WebServiceMessage.class);
        expect(message.getPayloadSource()).andReturn(new StringSource("<a><b>1</b></a>")).times(2);

        replay(message);

        matcher.match(message);
View Full Code Here

    public void evaluatesToIntegerNonMatch() throws IOException, AssertionError {
        XPathExpectationsHelper helper = new XPathExpectationsHelper("//b");
        WebServiceMessageMatcher matcher = helper.evaluatesTo(2);
        assertNotNull(matcher);

        WebServiceMessage message = createMock(WebServiceMessage.class);
        expect(message.getPayloadSource()).andReturn(new StringSource("<a><b>1</b></a>")).times(2);

        replay(message);

        matcher.match(message);
    }
View Full Code Here

        Map<String, String> ns = Collections.singletonMap("x", "http://example.org");
        XPathExpectationsHelper helper = new XPathExpectationsHelper("//x:b", ns);
        WebServiceMessageMatcher matcher = helper.exists();
        assertNotNull(matcher);

        WebServiceMessage message = createMock(WebServiceMessage.class);
        expect(message.getPayloadSource())
                .andReturn(new StringSource("<a:a xmlns:a=\"http://example.org\"><a:b/></a:a>"));

        replay(message);

        matcher.match(message);
View Full Code Here

        Map<String, String> ns = Collections.singletonMap("x", "http://example.org");
        XPathExpectationsHelper helper = new XPathExpectationsHelper("//b", ns);
        WebServiceMessageMatcher matcher = helper.exists();
        assertNotNull(matcher);

        WebServiceMessage message = createMock(WebServiceMessage.class);
        expect(message.getPayloadSource())
                .andReturn(new StringSource("<a:a xmlns:a=\"http://example.org\"><a:b/></a:a>")).times(2);

        replay(message);

        matcher.match(message);
View Full Code Here

        matcher.match(soapMessage);
    }

    @Test(expected = AssertionError.class)
    public void nonSoap() throws Exception {
        WebServiceMessage message = createMock(WebServiceMessage.class);

        matcher.match(message);
    }
View Full Code Here

TOP

Related Classes of org.springframework.ws.WebServiceMessage

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.