Skip to content

Commit 86bd720

Browse files
marysiuniqvil02
andauthored
Apply suggestions from code review
Co-authored-by: Piotr Idzik <[email protected]>
1 parent 002de56 commit 86bd720

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import static org.junit.jupiter.api.Assertions.assertThrows;
55

66
import java.util.stream.Stream;
7-
import org.junit.jupiter.api.Assertions;
87
import org.junit.jupiter.api.Test;
98
import org.junit.jupiter.params.ParameterizedTest;
109
import org.junit.jupiter.params.provider.Arguments;
@@ -22,7 +21,7 @@ private static Stream<Arguments> inputStream() {
2221
}
2322

2423
@Test
25-
void testNegativeNumber() {
26-
Exception exception = assertThrows(IllegalArgumentException.class, () -> FactorialRecursion.factorial(-1));
24+
void testThrowsForNegativeInput() {
25+
assertThrows(IllegalArgumentException.class, () -> FactorialRecursion.factorial(-1));
2726
}
2827
}

0 commit comments

Comments
 (0)