File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/test/java/com/thealgorithms/maths Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 33import static org .junit .jupiter .api .Assertions .assertEquals ;
44import static org .junit .jupiter .api .Assertions .assertThrows ;
55
6+ import java .math .BigInteger ;
7+
68import org .junit .jupiter .api .Test ;
79
810public class FactorialTest {
@@ -16,9 +18,9 @@ public void testWhenInvalidInoutProvidedShouldThrowException() {
1618
1719 @ Test
1820 public void testCorrectFactorialCalculation () {
19- assertEquals (1 , Factorial .factorial (0 ));
20- assertEquals (1 , Factorial .factorial (1 ));
21- assertEquals (120 , Factorial .factorial (5 ));
22- assertEquals (3628800 , Factorial .factorial (10 ));
21+ assertEquals (BigInteger . ONE , Factorial .factorial (0 ));
22+ assertEquals (BigInteger . ONE , Factorial .factorial (1 ));
23+ assertEquals (BigInteger . valueOf ( 120 ) , Factorial .factorial (5 ));
24+ assertEquals (BigInteger . valueOf ( 3628800 ) , Factorial .factorial (10 ));
2325 }
2426}
You can’t perform that action at this time.
0 commit comments