Testing a few other types of input.

This commit is contained in:
Rob Greene 2018-11-21 14:28:27 -06:00
parent 722fee2b6d
commit 6989a186e6
1 changed files with 3 additions and 0 deletions

View File

@ -8,8 +8,10 @@ public class ConverterTest {
@Test
public void testToInteger() {
assertEquals(0x1000, Converters.toInteger("0x1000").intValue());
assertEquals(0x1000, Converters.toInteger("0X1000").intValue());
assertEquals(0x1000, Converters.toInteger("$1000").intValue());
assertEquals(1000, Converters.toInteger("1000").intValue());
assertNull(Converters.toInteger(null));
}
@Test
@ -20,6 +22,7 @@ public class ConverterTest {
assertFalse(Converters.toBoolean("faLse"));
assertFalse(Converters.toBoolean("No"));
assertFalse(Converters.toBoolean("notreally"));
assertNull(Converters.toBoolean(null));
}
@Test