We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5978973 commit 6fd4895Copy full SHA for 6fd4895
1 file changed
src/test/java/com/thealgorithms/stacks/StackUsingLinkedListTest.java
@@ -1,9 +1,9 @@
1
package com.thealgorithms.stacks;
2
-
+import static org.junit.jupiter.api.Assertions.*;
3
import org.junit.jupiter.api.BeforeEach;
4
import org.junit.jupiter.api.Test;
5
6
-import static org.junit.jupiter.api.Assertions.*;
+
7
8
public class StackUsingLinkedListTest {
9
private StackUsingLinkedList<Integer> stack;
@@ -51,8 +51,7 @@ public void testPopOnEmptyStack() {
51
}
52
@Test
53
public void testPeekOnEmptyStackThrowsException() {
54
- RuntimeException exception =
55
- assertThrows(RuntimeException.class, () -> stack.peek());
+ RuntimeException exception = assertThrows(RuntimeException.class, () -> stack.peek());
56
assertEquals("Stack is empty", exception.getMessage());
57
58
0 commit comments