Skip to content

Commit

Permalink
Rework: remove setType call from assertThatIllegalArgumentException l…
Browse files Browse the repository at this point in the history
…ambda in ScimUserTests.testPhoneNumber
  • Loading branch information
adrianhoelzl-sap committed Mar 15, 2024
1 parent 02bd32b commit 5e89664
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,11 @@ public void testPhoneNumber() {
ScimUser user = new ScimUser();
user.setPhoneNumbers(Collections.singletonList(p1));

assertThatIllegalArgumentException().isThrownBy(() -> {
p1.setType(null);
user.addPhoneNumber(p1.getValue());
});
// should reject adding duplicate phone number if the existing has a type set to null
p1.setType(null);
assertThatIllegalArgumentException()
.isThrownBy(() -> user.addPhoneNumber(p1.getValue()))
.withMessageStartingWith("Already contains phoneNumber");
}

@Test
Expand Down

0 comments on commit 5e89664

Please sign in to comment.