Add tests for factorial (#3107)
This commit is contained in:
parent
45f3e5b6de
commit
8982692ca6
16
src/test/java/com/thealgorithms/maths/FactorialTest.java
Normal file
16
src/test/java/com/thealgorithms/maths/FactorialTest.java
Normal file
@ -0,0 +1,16 @@
|
||||
package com.thealgorithms.maths;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
|
||||
|
||||
public class FactorialTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
Factorial fact = new Factorial();
|
||||
assertEquals(120,fact.factorial(5));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user