| 
17 | 17 | import org.bukkit.entity.EntityType;  | 
18 | 18 | import org.bukkit.inventory.ItemStack;  | 
19 | 19 | import org.bukkit.inventory.meta.ItemMeta;  | 
20 |  | -import org.bukkit.material.SpawnEgg;  | 
21 | 20 | import org.bukkit.potion.PotionEffectType;  | 
22 | 21 | import org.junit.BeforeClass;  | 
23 | 22 | import org.junit.Test;  | 
@@ -90,48 +89,6 @@ public void testItemDisplayName() throws Exception {  | 
90 | 89 |         assertEquals("\u82b1\u5c97\u5ca9", LanguageHelper.getItemDisplayName(UTF8Test, "zh_CN"));  | 
91 | 90 |     }  | 
92 | 91 | 
 
  | 
93 |  | - | 
94 |  | -    @Test  | 
95 |  | -    public void testPotionDisplayName() throws Exception {  | 
96 |  | - | 
97 |  | -        ItemStack waterBottle = mock(ItemStack.class);  | 
98 |  | -        when(waterBottle.getType()).thenReturn(Material.POTION);  | 
99 |  | -        when(waterBottle.getDurability()).thenReturn((short) 0);  | 
100 |  | - | 
101 |  | -        //assertEquals("Water Bottle", LanguageHelper.getItemDisplayName(waterBottle, "en_US"));  | 
102 |  | - | 
103 |  | -        ItemStack awkwardPotion = mock(ItemStack.class);  | 
104 |  | -        when(awkwardPotion.getType()).thenReturn(Material.POTION);  | 
105 |  | -        when(awkwardPotion.getDurability()).thenReturn((short) 16);  | 
106 |  | - | 
107 |  | -        //assertEquals("Awkward Potion", LanguageHelper.getItemDisplayName(awkwardPotion, "en_US"));  | 
108 |  | - | 
109 |  | -        ItemStack regenPotion = mock(ItemStack.class);  | 
110 |  | -        when(regenPotion.getType()).thenReturn(Material.POTION);  | 
111 |  | -        when(regenPotion.getDurability()).thenReturn((short) 8193);  | 
112 |  | - | 
113 |  | -        //assertEquals("Potion of Regeneration", LanguageHelper.getItemDisplayName(regenPotion, "en_US"));  | 
114 |  | - | 
115 |  | -        ItemStack splashRegenPotion = mock(ItemStack.class);  | 
116 |  | -        when(splashRegenPotion.getType()).thenReturn(Material.POTION);  | 
117 |  | -        when(splashRegenPotion.getDurability()).thenReturn((short) 16385);  | 
118 |  | - | 
119 |  | -        //assertEquals("Splash Potion of Regeneration", LanguageHelper.getItemDisplayName(splashRegenPotion, "en_US"));  | 
120 |  | -    }  | 
121 |  | - | 
122 |  | -    @Test  | 
123 |  | -    public void testMonsterEggDisplayName() throws Exception {  | 
124 |  | - | 
125 |  | -        ItemStack creeperEgg = mock(ItemStack.class);  | 
126 |  | -        SpawnEgg egg = mock(SpawnEgg.class);  | 
127 |  | -        when(egg.getSpawnedType()).thenReturn(EntityType.CREEPER);  | 
128 |  | - | 
129 |  | -        when(creeperEgg.getType()).thenReturn(Material.MONSTER_EGG);  | 
130 |  | -        when(creeperEgg.getData()).thenReturn(egg);  | 
131 |  | - | 
132 |  | -        assertEquals("Spawn Creeper", LanguageHelper.getItemDisplayName(creeperEgg, "en_US"));  | 
133 |  | -    }  | 
134 |  | - | 
135 | 92 |     @Test  | 
136 | 93 |     public void testItemMetaDisplayName() throws Exception {  | 
137 | 94 |         ItemStack metaTest = mock(ItemStack.class);  | 
 | 
0 commit comments