Skip to content

Commit

Permalink
Added test for empty long value when converting a string to a long value
Browse files Browse the repository at this point in the history
Signed-off-by: Ionut Mihai Marisca <ionut-mihai.marisca@hpe.com>
  • Loading branch information
Ionut Mihai Marisca committed Sep 5, 2017
1 parent 9db5bd1 commit 397721b
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ public void toLongValid() throws Exception {
assertEquals(NumberUtilities.toLong("12345"), 12345);
assertEquals(NumberUtilities.toLong("-123"), -123);
assertEquals(NumberUtilities.toLong(null, 0), 0);
assertEquals(NumberUtilities.toLong("", 100), 100);
}

private void testInvalidLong(String value) {
Expand Down

0 comments on commit 397721b

Please sign in to comment.