use of ch.aaap.harvestclient.exception.RequestProcessingException in project harvest-client by 3AP-AG.
the class UsersApiImplTest method createExistingEmailFails.
@Test
void createExistingEmailFails() {
RequestProcessingException exception = Assertions.assertThrows(RequestProcessingException.class, () -> {
User creationInfo = ImmutableUser.builder().firstName(fixUserFirst).lastName(fixUserLast).email(fixUserEmail).build();
api.create(creationInfo);
});
assertEquals(422, exception.getHttpCode());
assertTrue(exception.getMessage().contains(fixUserEmail));
}
Aggregations