This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 321a213 CAMEL-13382: Added unit test
321a213 is described below
commit 321a21335de501b0ef2247fe6140110668228306
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Apr 2 10:56:17 2019 +0200
CAMEL-13382: Added unit test
---
.../java/org/apache/camel/catalog/CamelCatalogTest.java | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git
a/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
b/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
index b290ba8..0d3257e 100644
---
a/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
+++
b/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
@@ -1131,6 +1131,23 @@ public class CamelCatalogTest {
}
@Test
+ public void testValidateEndpointHttpPropertyPlaceholder() throws Exception
{
+ String uri =
"http://api.openweathermap.org/data/2.5/weather?{{property.weatherUri}}";
+ EndpointValidationResult result =
catalog.validateEndpointProperties(uri);
+ assertTrue(result.isSuccess());
+ result = catalog.validateEndpointProperties(uri, true);
+ assertTrue(result.isSuccess());
+
+ // use incorrect style using ${ } as placeholder
+ uri =
"http://api.openweathermap.org/data/2.5/weather?${property.weatherUri}";
+ result = catalog.validateEndpointProperties(uri);
+ assertTrue(result.isSuccess());
+ result = catalog.validateEndpointProperties(uri, true);
+ assertFalse(result.isSuccess());
+ assertEquals("${property.weatherUri}",
result.getUnknown().iterator().next());
+ }
+
+ @Test
public void testValidateEndpointJmsDefault() throws Exception {
String uri = "jms:cheese?maxMessagesPerTask=-1";