mirror of
https://github.com/MilkBowl/Vault.git
synced 2025-01-14 04:02:00 +01:00
add itemstack test
This commit is contained in:
parent
4b2be56ae6
commit
0b306d01ec
@ -7,6 +7,7 @@ import java.util.EnumSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.junit.Test;
|
||||
|
||||
import net.milkbowl.vault.item.ItemInfo;
|
||||
@ -59,6 +60,21 @@ public class ItemTest {
|
||||
assertEquals(false, failed);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testItemStacks() {
|
||||
boolean failed = false;
|
||||
for (ItemInfo item : Items.getItemList()) {
|
||||
ItemStack stack = item.toStack();
|
||||
try {
|
||||
assertEquals(item, Items.itemByStack(stack));
|
||||
} catch (AssertionError e) {
|
||||
e.printStackTrace();
|
||||
failed = true;
|
||||
}
|
||||
}
|
||||
assertEquals(false, failed);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void MissingMaterialtest() {
|
||||
for (Material mat : Material.values()) {
|
||||
|
Loading…
Reference in New Issue
Block a user