From 8cbb024258761f6ac8d3266506057c5401cea13c Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Sun, 19 Mar 2023 06:51:30 +0100 Subject: [PATCH] Fix failing unit tests for CraftingJobDependencyGraph --- .../api/crafting/TestCraftingJobDependencyGraph.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/cyclops/integratedcrafting/api/crafting/TestCraftingJobDependencyGraph.java b/src/test/java/org/cyclops/integratedcrafting/api/crafting/TestCraftingJobDependencyGraph.java index eda05bd5..31082fc6 100644 --- a/src/test/java/org/cyclops/integratedcrafting/api/crafting/TestCraftingJobDependencyGraph.java +++ b/src/test/java/org/cyclops/integratedcrafting/api/crafting/TestCraftingJobDependencyGraph.java @@ -229,31 +229,37 @@ public void testRemoveAndReAdd() { assertThat(Sets.newHashSet(g.getDependents(J3)), equalTo(Sets.newHashSet(J2))); } - @Test(expected = IllegalStateException.class) + @Test public void testOnFinishedInvalid1() { g.addDependency(J0, J1); g.addDependency(J1, J2); g.addDependency(J2, J3); g.onCraftingJobFinished(J2); + + assertThat(Sets.newHashSet(g.getCraftingJobs()), equalTo(Sets.newHashSet(J0, J1, J3))); } - @Test(expected = IllegalStateException.class) + @Test public void testOnFinishedInvalid2() { g.addDependency(J0, J1); g.addDependency(J1, J2); g.addDependency(J2, J3); g.onCraftingJobFinished(J1); + + assertThat(Sets.newHashSet(g.getCraftingJobs()), equalTo(Sets.newHashSet(J2, J3))); } - @Test(expected = IllegalStateException.class) + @Test public void testOnFinishedInvalid3() { g.addDependency(J0, J1); g.addDependency(J1, J2); g.addDependency(J2, J3); g.onCraftingJobFinished(J0); + + assertThat(Sets.newHashSet(g.getCraftingJobs()), equalTo(Sets.newHashSet(J1, J2, J3))); } @Test