1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-27 21:37:58 +01:00

More UserID tests

This commit is contained in:
Paul Schaub 2021-01-21 14:52:11 +01:00
parent 2880e0bed0
commit 87eab2fb9a
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -75,4 +75,15 @@ public class UserIdTest {
.withEmail("juliet@capulet.lit")
.toString());
}
@Test
public void throwIfOnlyEmailEmailNull() {
assertThrows(IllegalArgumentException.class, () -> UserId.onlyEmail(null));
}
@Test
public void testNameAndEmail() {
UserId userId = UserId.nameAndEmail("Maurice Moss", "moss.m@reynholm.co.uk");
assertEquals("Maurice Moss <moss.m@reynholm.co.uk>", userId.toString());
}
}