bdemers commented on code in PR #448:
URL: https://github.com/apache/directory-scimple/pull/448#discussion_r1424361352


##########
scim-core/src/test/java/org/apache/directory/scim/core/repository/PatchHandlerTest.java:
##########
@@ -465,6 +467,39 @@ public void deleteItemWithComplexFilter() throws 
FilterParseException {
     ));
   }
 
+  @Test
+  public void addItemToCollection() throws FilterParseException {
+    PatchOperation op = new PatchOperation();
+    op.setOperation(ADD);
+    op.setPath(PatchOperationPath.fromString("members"));
+    op.setValue(List.of(
+      Map.of(
+        "value", "9876",
+        "display", "testUser2",
+        "type", "User")
+    ));
+
+    ScimGroup updatedGroup = patchHandler.apply(group(), List.of(op));
+    assertThat(updatedGroup.getMembers().size()).isEqualTo(3);

Review Comment:
   nit: may want to assert on the members of the to ensure member collection 
contains the expected new value



-- 
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: dev-unsubscr...@directory.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org
For additional commands, e-mail: dev-h...@directory.apache.org

Reply via email to