Skip to content

Commit

Permalink
Add test for SocketAddressProperty$Decoder.apply (#1265)
Browse files Browse the repository at this point in the history
  • Loading branch information
lacinoire authored Aug 8, 2024
1 parent cac3a79 commit 60e098d
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,12 @@ void failsOnBadPort() {
assertTrue(exception.getMessage().contains("Port"));
}
}

@Test
public void failsOnBadAddress() throws Exception {
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> {
SocketAddressProperty.Decoder.INSTANCE.apply("");
});
assertEquals("Invalid address", exception.getMessage());
}
}

0 comments on commit 60e098d

Please sign in to comment.