add missing material test to make sure we register all bukkit materials

atleast once.
Add missing Golden Carrot
This commit is contained in:
Nick Minkler 2014-01-29 22:43:05 -08:00
parent ed2401d9ac
commit 9065713a6a
2 changed files with 10 additions and 0 deletions

View File

@ -468,6 +468,7 @@ public class Items {
items.add(new ItemInfo("Human Head", new String[][]{{"huma", "skul"}, {"huma", "hea"}}, Material.SKULL_ITEM, (short) 3));
items.add(new ItemInfo("Creeper Head", new String[][]{{"cree", "skul"}, {"cree", "hea"}}, Material.SKULL_ITEM, (short) 4));
items.add(new ItemInfo("Carrot", new String[][]{{"carro"}}, Material.CARROT_ITEM));
items.add(new ItemInfo("Golden Carrot", new String[][]{{"carr", "gol"}}, Material.GOLDEN_CARROT));
items.add(new ItemInfo("Carrot Block", new String[][]{{"blo", "carr"}}, Material.CARROT));
items.add(new ItemInfo("Carrot on a Stick", new String[][]{{"sti", "carr"}}, Material.CARROT_STICK));
items.add(new ItemInfo("Potato", new String[][]{{"pota"}}, Material.POTATO_ITEM));

View File

@ -1,7 +1,9 @@
package net.milkbowl.vault.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.bukkit.Material;
import org.junit.Test;
import net.milkbowl.vault.item.ItemInfo;
@ -24,4 +26,11 @@ public class ItemTest {
}
assertEquals(false, failed);
}
@Test
public void MissingMaterialtest() {
for (Material mat : Material.values()) {
assertNotNull("Missing " + mat.toString() + " in item search list", Items.itemByType(mat));
}
}
}