From 8982692ca69ce5edad9d319b68fc6ff2cc46cbdb Mon Sep 17 00:00:00 2001 From: Squirrellllllllllll <90439584+Squirrellllllllllll@users.noreply.github.com> Date: Thu, 9 Jun 2022 13:47:31 +0700 Subject: [PATCH] Add tests for factorial (#3107) --- .../com/thealgorithms/maths/FactorialTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/test/java/com/thealgorithms/maths/FactorialTest.java diff --git a/src/test/java/com/thealgorithms/maths/FactorialTest.java b/src/test/java/com/thealgorithms/maths/FactorialTest.java new file mode 100644 index 00000000..0eee66c3 --- /dev/null +++ b/src/test/java/com/thealgorithms/maths/FactorialTest.java @@ -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)); + } + +} \ No newline at end of file