mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-27 03:27:56 +01:00
Test isSimilar
This commit is contained in:
parent
feb2f34161
commit
3ffe37591b
@ -39,6 +39,10 @@ public class ItemTest {
|
|||||||
var item2 = ItemStack.of(Material.DIAMOND_SWORD);
|
var item2 = ItemStack.of(Material.DIAMOND_SWORD);
|
||||||
assertEquals(item1, item2);
|
assertEquals(item1, item2);
|
||||||
assertNotEquals(item1.withAmount(5), item2.withAmount(2));
|
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
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user