From 3ffe37591b99131a7150b7344889451e3160370b Mon Sep 17 00:00:00 2001 From: themode Date: Wed, 22 Dec 2021 10:31:02 +0100 Subject: [PATCH] Test isSimilar --- src/test/java/item/ItemTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/java/item/ItemTest.java b/src/test/java/item/ItemTest.java index 5e2e833f8..94771c19d 100644 --- a/src/test/java/item/ItemTest.java +++ b/src/test/java/item/ItemTest.java @@ -39,6 +39,10 @@ public class ItemTest { var item2 = ItemStack.of(Material.DIAMOND_SWORD); assertEquals(item1, item2); assertNotEquals(item1.withAmount(5), item2.withAmount(2)); + + assertTrue(item1.isSimilar(item2)); + assertTrue(item1.withAmount(5).isSimilar(item2.withAmount(2))); + assertFalse(item1.isSimilar(item2.withDisplayName(Component.text("Hey!")))); } @Test