Skip to content

Commit

Permalink
Fix failing unit tests for CraftingJobDependencyGraph
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Mar 19, 2023
1 parent d356828 commit 8cbb024
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8cbb024

Please sign in to comment.