INT-461: changed the order in which the constructor arguments for the *XPathMessageSelector are provided (to match the actual constructor), the current constructor resolution on bean creation is ambiguous.
This commit is contained in:
@@ -44,7 +44,15 @@ public class XPathSelectorParserTests {
|
||||
public void testStringExpressionWithNamespaceBoolean() throws Exception {
|
||||
String contextXml = "<si-xml:xpath-selector id='selector' evaluation-result-type='boolean'><si-xml:xpath-expression expression='/ns:name' ns-prefix='ns' ns-uri='www.example.org'/> </si-xml:xpath-selector>";
|
||||
MessageSelector selector = getSelector(contextXml);
|
||||
|
||||
assertTrue(selector.accept(new GenericMessage<Document>(XmlTestUtil.getDocumentForString("<ns1:name xmlns:ns1='www.example.org'>outputOne</ns1:name>"))));
|
||||
assertFalse(selector.accept(new GenericMessage<Document>(XmlTestUtil.getDocumentForString("<name>outputOne</name>"))));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStringExpressionWithNamespaceString() throws Exception {
|
||||
String contextXml = "<si-xml:xpath-selector id='selector' evaluation-result-type='string' string-test-value='outputOne'><si-xml:xpath-expression expression='/ns:name' ns-prefix='ns' ns-uri='www.example.org'/> </si-xml:xpath-selector>";
|
||||
MessageSelector selector = getSelector(contextXml);
|
||||
|
||||
assertTrue(selector.accept(new GenericMessage<Document>(XmlTestUtil.getDocumentForString("<ns1:name xmlns:ns1='www.example.org'>outputOne</ns1:name>"))));
|
||||
assertFalse(selector.accept(new GenericMessage<Document>(XmlTestUtil.getDocumentForString("<name>outputOne</name>"))));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user