Skip to content

Commit bdaf869

Browse files
committed
Add a test for VampireNumb.splitIntoSortedDigits
1 parent d814c6f commit bdaf869

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/test/java/com/thealgorithms/maths/VampireNumberTest.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import org.junit.jupiter.api.Test;
44

55
import static com.thealgorithms.maths.VampireNumber.isVampireNumber;
6-
import static org.junit.jupiter.api.Assertions.assertFalse;
7-
import static org.junit.jupiter.api.Assertions.assertTrue;
6+
import static com.thealgorithms.maths.VampireNumber.splitIntoSortedDigits;
7+
import static org.junit.jupiter.api.Assertions.*;
88

99
class VampireNumberTest {
1010
@Test
@@ -26,4 +26,10 @@ void areNotVampireNumbers() {
2626
assertFalse(isVampireNumber(51, 39, false));
2727
assertFalse(isVampireNumber(51, 39, true));
2828
}
29+
30+
@Test
31+
void testSplitIntoSortedDigits() {
32+
assertEquals("123", splitIntoSortedDigits(321));
33+
assertEquals("02234", splitIntoSortedDigits(20, 324));
34+
}
2935
}

0 commit comments

Comments
 (0)