apupier commented on code in PR #24855:
URL: https://github.com/apache/camel/pull/24855#discussion_r3603768789
##########
core/camel-core/src/test/java/org/apache/camel/component/validator/CustomSchemaFactoryFeatureTest.java:
##########
@@ -36,11 +37,14 @@ protected Registry createCamelRegistry() throws Exception {
// just inject the SchemaFactory as we want
@Test
- public void testCustomSchemaFactory() throws Exception {
- ValidatorComponent v = new ValidatorComponent();
- v.setCamelContext(context);
- v.init();
-
v.createEndpoint("validator:org/apache/camel/component/validator/unsecuredSchema.xsd?schemaFactory=#MySchemaFactory");
+ public void testCustomSchemaFactory() {
+ Assertions.assertDoesNotThrow(() -> {
+ ValidatorComponent v = new ValidatorComponent();
+ v.setCamelContext(context);
+ v.init();
+ v.createEndpoint(
+
"validator:org/apache/camel/component/validator/unsecuredSchema.xsd?schemaFactory=#MySchemaFactory");
Review Comment:
would be better to provide a real check and look on the content of the
createdendpoitn that it contains the custom schema factory
##########
core/camel-core/src/test/java/org/apache/camel/component/file/FileProduceTempPrefixTest.java:
##########
@@ -75,7 +76,7 @@ public void testTempPrefix() {
@Test
public void testTempPrefixUUIDFilename() {
- template.sendBody("direct:a", "Bye World");
+ Assertions.assertDoesNotThrow(() -> template.sendBody("direct:a", "Bye
World"));
Review Comment:
this should provide a real assertion on the created file like other tests
(which is not completely trivial as this won't be the same name each time)
##########
core/camel-core/src/test/java/org/apache/camel/component/file/FileInvalidStartingPathTest.java:
##########
@@ -36,8 +37,8 @@ public void testInvalidStartingPath() {
@Test
public void testValidStartingPath() {
- context.getEndpoint(
-
fileUri("?fileName=${date:now:yyyyMMdd}/${in.header.messageType}-${date:now:hhmmss}.txt"));
+ assertDoesNotThrow(() -> context.getEndpoint(
+
fileUri("?fileName=${date:now:yyyyMMdd}/${in.header.messageType}-${date:now:hhmmss}.txt")));
Review Comment:
It would be better to check the content of the endpoint generated
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]