From aae46f82eab8ae0bd855d94209083df2144818e4 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 28 May 2020 19:31:27 +1000 Subject: [PATCH] #665: Add test for Material#getCraftingRemainingItem() --- src/test/java/org/bukkit/PerMaterialTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/java/org/bukkit/PerMaterialTest.java b/src/test/java/org/bukkit/PerMaterialTest.java index fde64cff4a..ba8ea77eec 100644 --- a/src/test/java/org/bukkit/PerMaterialTest.java +++ b/src/test/java/org/bukkit/PerMaterialTest.java @@ -245,4 +245,14 @@ public class PerMaterialTest extends AbstractTestingBase { assertNotNull(material.createBlockData()); } } + + @Test + public void testCraftingRemainingItem() { + if (material.isItem()) { + Item expectedItem = CraftMagicNumbers.getItem(material).p(); // PAIL rename p() -> getCraftingRemainingItem() + Material expected = expectedItem == null ? null : CraftMagicNumbers.getMaterial(expectedItem); + + assertThat(material.getCraftingRemainingItem(), is(expected)); + } + } }