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:
Marius Bogoevici
2008-11-07 14:47:20 +00:00
parent 7084378432
commit 33d3dc4601
2 changed files with 20 additions and 12 deletions

View File

@@ -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>"))));
}