Skip to content

Commit

Permalink
Remove the test for potion and monster egg
Browse files Browse the repository at this point in the history
  • Loading branch information
Krasjet committed May 28, 2016
1 parent bea78d4 commit 3e7da4f
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions src/test/java/com/meowj/langutils/lang/LanguageHelperTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.bukkit.entity.EntityType;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.material.SpawnEgg;
import org.bukkit.potion.PotionEffectType;
import org.junit.BeforeClass;
import org.junit.Test;
Expand Down Expand Up @@ -90,48 +89,6 @@ public void testItemDisplayName() throws Exception {
assertEquals("\u82b1\u5c97\u5ca9", LanguageHelper.getItemDisplayName(UTF8Test, "zh_CN"));
}


@Test
public void testPotionDisplayName() throws Exception {

ItemStack waterBottle = mock(ItemStack.class);
when(waterBottle.getType()).thenReturn(Material.POTION);
when(waterBottle.getDurability()).thenReturn((short) 0);

//assertEquals("Water Bottle", LanguageHelper.getItemDisplayName(waterBottle, "en_US"));

ItemStack awkwardPotion = mock(ItemStack.class);
when(awkwardPotion.getType()).thenReturn(Material.POTION);
when(awkwardPotion.getDurability()).thenReturn((short) 16);

//assertEquals("Awkward Potion", LanguageHelper.getItemDisplayName(awkwardPotion, "en_US"));

ItemStack regenPotion = mock(ItemStack.class);
when(regenPotion.getType()).thenReturn(Material.POTION);
when(regenPotion.getDurability()).thenReturn((short) 8193);

//assertEquals("Potion of Regeneration", LanguageHelper.getItemDisplayName(regenPotion, "en_US"));

ItemStack splashRegenPotion = mock(ItemStack.class);
when(splashRegenPotion.getType()).thenReturn(Material.POTION);
when(splashRegenPotion.getDurability()).thenReturn((short) 16385);

//assertEquals("Splash Potion of Regeneration", LanguageHelper.getItemDisplayName(splashRegenPotion, "en_US"));
}

@Test
public void testMonsterEggDisplayName() throws Exception {

ItemStack creeperEgg = mock(ItemStack.class);
SpawnEgg egg = mock(SpawnEgg.class);
when(egg.getSpawnedType()).thenReturn(EntityType.CREEPER);

when(creeperEgg.getType()).thenReturn(Material.MONSTER_EGG);
when(creeperEgg.getData()).thenReturn(egg);

assertEquals("Spawn Creeper", LanguageHelper.getItemDisplayName(creeperEgg, "en_US"));
}

@Test
public void testItemMetaDisplayName() throws Exception {
ItemStack metaTest = mock(ItemStack.class);
Expand Down

0 comments on commit 3e7da4f

Please sign in to comment.