1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.ws.test.client;
18
19 import java.util.Map;
20
21 import org.springframework.ws.test.support.matcher.XPathExpectationsHelper;
22
23
24
25
26
27
28
29 class XPathExpectationsHelperAdapter implements RequestXPathExpectations {
30
31 private final XPathExpectationsHelper helper;
32
33 XPathExpectationsHelperAdapter(String expression, Map<String, String> namespaces) {
34 helper = new XPathExpectationsHelper(expression, namespaces);
35 }
36
37 public RequestMatcher exists() {
38 return new WebServiceMessageMatcherAdapter(helper.exists());
39 }
40
41 public RequestMatcher doesNotExist() {
42 return new WebServiceMessageMatcherAdapter(helper.doesNotExist());
43 }
44
45 public RequestMatcher evaluatesTo(boolean expectedValue) {
46 return new WebServiceMessageMatcherAdapter(helper.evaluatesTo(expectedValue));
47 }
48
49 public RequestMatcher evaluatesTo(int expectedValue) {
50 return new WebServiceMessageMatcherAdapter(helper.evaluatesTo(expectedValue));
51 }
52
53 public RequestMatcher evaluatesTo(double expectedValue) {
54 return new WebServiceMessageMatcherAdapter(helper.evaluatesTo(expectedValue));
55 }
56
57 public RequestMatcher evaluatesTo(String expectedValue) {
58 return new WebServiceMessageMatcherAdapter(helper.evaluatesTo(expectedValue));
59 }
60
61 }