summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/bukkit
diff options
context:
space:
mode:
authorfullwall <fullwall@optusnet.com>2012-01-09 15:51:32 +0800
committerEvilSeph <evilseph@gmail.com>2012-02-10 17:41:13 -0500
commitf52665348e3cf0e4896c9eb32c0e3c855a6d92e2 (patch)
treedfeb0a427532a4348f75d272986dd90cadde4185 /src/test/java/org/bukkit
parent63b9ed9ab4ddd0adc424147a1c30f4d7f3f93d41 (diff)
downloadcraftbukkit-f52665348e3cf0e4896c9eb32c0e3c855a6d92e2.tar
craftbukkit-f52665348e3cf0e4896c9eb32c0e3c855a6d92e2.tar.gz
craftbukkit-f52665348e3cf0e4896c9eb32c0e3c855a6d92e2.tar.lz
craftbukkit-f52665348e3cf0e4896c9eb32c0e3c855a6d92e2.tar.xz
craftbukkit-f52665348e3cf0e4896c9eb32c0e3c855a6d92e2.zip
[Bleeding] Added Potions API. Fixes BUKKIT-389
Diffstat (limited to 'src/test/java/org/bukkit')
-rw-r--r--src/test/java/org/bukkit/potion/PotionTest.java27
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()));
+ }
+ }
+ }
+}