Add tests for factorial (#3107)

This commit is contained in:
Squirrellllllllllll 2022-06-09 13:47:31 +07:00 committed by GitHub
parent 45f3e5b6de
commit 8982692ca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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));
}
}