exceptionfactory commented on code in PR #10497:
URL: https://github.com/apache/nifi/pull/10497#discussion_r2495497328
##########
nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/PutMongoTest.java:
##########
@@ -72,4 +78,36 @@ public void testQueryKeyValidation() {
it = results.iterator();
assertTrue(it.next().toString().endsWith("Either the update query key
or the update query field must be set."));
}
+
+ @Test
+ public void testParseUpdateKey_IdVariousTypes() throws Exception {
+ PutMongo processor = new PutMongo();
+
+ Method parseUpdateKey =
PutMongo.class.getDeclaredMethod("parseUpdateKey", String.class,
java.util.Map.class);
+ parseUpdateKey.setAccessible(true);
Review Comment:
Calling methods through reflection in tests is not ideal as it introduces
tight coupling to particular implementation details.
--
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]