diff options
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/org/bukkit/potion/PotionTest.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/java/org/bukkit/potion/PotionTest.java b/src/test/java/org/bukkit/potion/PotionTest.java new file mode 100644 index 00000000..edc308f8 --- /dev/null +++ b/src/test/java/org/bukkit/potion/PotionTest.java @@ -0,0 +1,27 @@ +package org.bukkit.potion; + +import static org.junit.Assert.*; + +import org.bukkit.craftbukkit.potion.CraftPotionBrewer; +import org.junit.BeforeClass; +import org.junit.Test; + +import net.minecraft.server.MobEffectList; + +public class PotionTest { + @BeforeClass + public static void setUp() { + Potion.setPotionBrewer(new CraftPotionBrewer()); + MobEffectList.BLINDNESS.getClass(); + PotionEffectType.stopAcceptingRegistrations(); + } + + @Test + public void getEffects() { + for (PotionType type : PotionType.values()) { + for (PotionEffect effect : new Potion(type).getEffects()) { + assertTrue(effect.getType() == PotionEffectType.getById(effect.getType().getId())); + } + } + } +} |