Skip to content

Commit 6989a18

Browse files
committed
Testing a few other types of input.
1 parent 722fee2 commit 6989a18

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api/src/test/java/io/github/applecommander/bastools/api/utils/ConverterTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ public class ConverterTest {
88
@Test
99
public void testToInteger() {
1010
assertEquals(0x1000, Converters.toInteger("0x1000").intValue());
11+
assertEquals(0x1000, Converters.toInteger("0X1000").intValue());
1112
assertEquals(0x1000, Converters.toInteger("$1000").intValue());
1213
assertEquals(1000, Converters.toInteger("1000").intValue());
14+
assertNull(Converters.toInteger(null));
1315
}
1416

1517
@Test
@@ -20,6 +22,7 @@ public void testToBoolean() {
2022
assertFalse(Converters.toBoolean("faLse"));
2123
assertFalse(Converters.toBoolean("No"));
2224
assertFalse(Converters.toBoolean("notreally"));
25+
assertNull(Converters.toBoolean(null));
2326
}
2427

2528
@Test

0 commit comments

Comments
 (0)