diff --git a/src/test/java/nova/core/recipes/crafting/ShapedCraftingRecipeTest.java b/src/test/java/nova/core/recipes/crafting/ShapedCraftingRecipeTest.java index a68c0d0b2..096597e40 100644 --- a/src/test/java/nova/core/recipes/crafting/ShapedCraftingRecipeTest.java +++ b/src/test/java/nova/core/recipes/crafting/ShapedCraftingRecipeTest.java @@ -87,9 +87,9 @@ public void testConsumeItems() { Optional.empty(), Optional.of(item2.build()), Optional.of(item3.build()), Optional.empty() }, 4, Optional[].class)); - assertThat(cg.iterator()).hasSize(2).containsExactly(item2.build(), item3.build()); + assertThat(cg).hasSize(2).containsExactly(item2.build(), item3.build()); recipe.consumeItems(cg); - assertThat(cg.stream().iterator()).isEmpty(); + assertThat(cg).isEmpty(); } @Test @@ -100,9 +100,9 @@ public void testConsumeItemsMirrored() { Optional.of(item2.build()), Optional.empty(), Optional.empty(), Optional.of(item3.build()) }, 4, Optional[].class)); - assertThat(cg.iterator()).hasSize(2).containsExactly(item2.build(), item3.build()); + assertThat(cg).hasSize(2).containsExactly(item2.build(), item3.build()); recipe.consumeItems(cg); - assertThat(cg.stream().iterator()).isEmpty(); + assertThat(cg).isEmpty(); } @Test(expected = IllegalArgumentException.class) diff --git a/src/test/java/nova/core/recipes/crafting/ShapelessCraftingRecipeTest.java b/src/test/java/nova/core/recipes/crafting/ShapelessCraftingRecipeTest.java index ece2fbe17..773c2fc64 100644 --- a/src/test/java/nova/core/recipes/crafting/ShapelessCraftingRecipeTest.java +++ b/src/test/java/nova/core/recipes/crafting/ShapelessCraftingRecipeTest.java @@ -81,9 +81,9 @@ public void testConsumeItems() { Optional.empty(), Optional.of(item3.build()), Optional.of(item2.build()), Optional.empty() }, 4, Optional[].class)); - assertThat(cg.iterator()).hasSize(2).containsExactly(item3.build(), item2.build()); + assertThat(cg).hasSize(2).containsExactly(item3.build(), item2.build()); recipe.consumeItems(cg); - assertThat(cg.stream().iterator()).isEmpty(); + assertThat(cg).isEmpty(); } @Test diff --git a/src/test/java/nova/core/util/RegistryTest.java b/src/test/java/nova/core/util/RegistryTest.java index 79afd10d8..fbd219603 100644 --- a/src/test/java/nova/core/util/RegistryTest.java +++ b/src/test/java/nova/core/util/RegistryTest.java @@ -47,7 +47,7 @@ public void testRegistry() throws Exception { assertThat(registry.get("ID1").get()).isEqualTo(id1); assertThat(registry.get("ID2").get()).isEqualTo(id2); - assertThat(registry.iterator()).containsOnly(id1, id2); + assertThat(registry).containsOnly(id1, id2); assertThat(registry.get("None").isPresent()).isFalse();