style: do not suppress serial (#5168)

This commit is contained in:
Piotr Idzik
2024-05-20 17:09:31 +02:00
committed by GitHub
parent 5ee98eeb48
commit 8466219685
3 changed files with 2 additions and 11 deletions

View File

@ -4,7 +4,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertIterableEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import com.thealgorithms.sorts.TopologicalSort.BackEdgeException;
import com.thealgorithms.sorts.TopologicalSort.Graph;
import java.util.LinkedList;
import org.junit.jupiter.api.Test;
@ -55,7 +54,7 @@ class TopologicalSortTest {
graph.addEdge("6", "2");
graph.addEdge("7", "");
graph.addEdge("8", "");
Exception exception = assertThrows(BackEdgeException.class, () -> TopologicalSort.sort(graph));
Exception exception = assertThrows(RuntimeException.class, () -> TopologicalSort.sort(graph));
String expected = "This graph contains a cycle. No linear ordering is possible. "
+ "Back edge: 6 -> 2";
assertEquals(exception.getMessage(), expected);