summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/bukkit/potion
diff options
context:
space:
mode:
authorWesley Wolfe <weswolf@aol.com>2012-12-14 02:02:02 -0600
committerWesley Wolfe <weswolf@aol.com>2012-12-14 02:02:02 -0600
commit0f4c206f9b256c441a142b0be68a4a76421c2911 (patch)
tree980ba23c5ac389461a518af3c69b12a4c9008214 /src/test/java/org/bukkit/potion
parent53b064ec79c62f34ca98dd08b0ae4cc04e51a81f (diff)
downloadcraftbukkit-0f4c206f9b256c441a142b0be68a4a76421c2911.tar
craftbukkit-0f4c206f9b256c441a142b0be68a4a76421c2911.tar.gz
craftbukkit-0f4c206f9b256c441a142b0be68a4a76421c2911.tar.lz
craftbukkit-0f4c206f9b256c441a142b0be68a4a76421c2911.tar.xz
craftbukkit-0f4c206f9b256c441a142b0be68a4a76421c2911.zip
Add isRecord and new material method tests.
Cleaned up all of the CraftBukkit tests, including moving some tests from MaterialTest to PerMaterialTest.
Diffstat (limited to 'src/test/java/org/bukkit/potion')
-rw-r--r--src/test/java/org/bukkit/potion/PotionTest.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/test/java/org/bukkit/potion/PotionTest.java b/src/test/java/org/bukkit/potion/PotionTest.java
index 1f0a2c52..1040b6ad 100644
--- a/src/test/java/org/bukkit/potion/PotionTest.java
+++ b/src/test/java/org/bukkit/potion/PotionTest.java
@@ -3,11 +3,11 @@ package org.bukkit.potion;
import static org.junit.Assert.*;
import static org.hamcrest.Matchers.*;
-import java.lang.reflect.Field;
import java.util.EnumMap;
import java.util.Map;
import org.bukkit.craftbukkit.potion.CraftPotionBrewer;
+import org.bukkit.support.Util;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -36,9 +36,7 @@ public class PotionTest {
@Test
public void testEffectCompleteness() throws SecurityException, IllegalAccessException, NoSuchFieldException {
- Field durationsField = net.minecraft.server.PotionBrewer.class.getDeclaredField("effectDurations");
- durationsField.setAccessible(true);
- Map<Integer, ?> effectDurations = (Map<Integer, ?>) durationsField.get(null);
+ Map<Integer, ?> effectDurations = Util.getInternalState(net.minecraft.server.PotionBrewer.class, null, "effectDurations");
Map<PotionType, String> effects = new EnumMap(PotionType.class);
for (int id : effectDurations.keySet()) {