#665: Add test for Material#getCraftingRemainingItem()

By: ben <ben@benwoodworth.net>
This commit is contained in:
CraftBukkit/Spigot 2020-05-28 19:31:27 +10:00
parent 9862a0135d
commit 515509a1a9

View file

@ -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));
}
}
}