MikeThomsen commented on a change in pull request #3646: NIFI-6546 - Add 
JsonPath set value support
URL: https://github.com/apache/nifi/pull/3646#discussion_r317405877
 
 

 ##########
 File path: 
nifi-commons/nifi-expression-language/src/test/java/org/apache/nifi/attribute/expression/language/TestQuery.java
 ##########
 @@ -384,12 +385,121 @@ public void testJsonPathDeleteHomePhoneNumber() throws 
IOException {
         verifyEquals("${json:jsonPath('$.firstName')}", attributes, "John");
         verifyEquals("${json:jsonPath('$.lastName')}", attributes, "Smith");
         verifyEquals("${json:jsonPath('$.age')}", attributes, "25");
+        verifyEquals("${json:jsonPath('$.voter')}", attributes, "true");
         verifyEquals("${json:jsonPath('$.address.postalCode')}", attributes, 
"10021-3100");
         
verifyEquals("${json:jsonPath(\"$.phoneNumbers[?(@.type=='home')].number\")}", 
attributes, "[]");
         verifyEquals("${json:jsonPath('$.phoneNumbers')}", attributes,
                 "{\"type\":\"office\",\"number\":\"646 555-4567\"}");
     }
 
+    @Test
+    public void testJsonPathSetFirstNameAttribute() throws IOException {
+        final Map<String, String> attributes = new HashMap<>();
 
 Review comment:
   A lot of duplication in these tests. That needs to be refactored so the same 
assertions and setup get reused.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to