summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorCeltic Minstrel <celtic.minstrel.ca@some.place>2012-02-25 12:39:10 -0500
committerEvilSeph <evilseph@gmail.com>2012-02-25 16:59:27 -0500
commit1c9d419c27e52347122f2eb43e294a36e0613501 (patch)
treed3720f499e736bbac4630568907142c69f7da0ac /src/test
parentbffb98503952d4da83509fb691e75d37534da818 (diff)
downloadbukkit-1c9d419c27e52347122f2eb43e294a36e0613501.tar
bukkit-1c9d419c27e52347122f2eb43e294a36e0613501.tar.gz
bukkit-1c9d419c27e52347122f2eb43e294a36e0613501.tar.lz
bukkit-1c9d419c27e52347122f2eb43e294a36e0613501.tar.xz
bukkit-1c9d419c27e52347122f2eb43e294a36e0613501.zip
[Bleeding] Add missing methods to Bukkit class, fix non-static methods, and add a junit test to ensure both these problems will be caught in future.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/bukkit/BukkitMirrorTest.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/java/org/bukkit/BukkitMirrorTest.java b/src/test/java/org/bukkit/BukkitMirrorTest.java
new file mode 100644
index 00000000..5728e429
--- /dev/null
+++ b/src/test/java/org/bukkit/BukkitMirrorTest.java
@@ -0,0 +1,19 @@
+package org.bukkit;
+
+import static org.junit.Assert.*;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
+import org.junit.Test;
+
+public class BukkitMirrorTest {
+ @Test
+ public final void test() throws NoSuchMethodException {
+ Method[] serverMethods = Server.class.getDeclaredMethods();
+ for(Method method : serverMethods) {
+ Method mirrorMethod = Bukkit.class.getDeclaredMethod(method.getName(), method.getParameterTypes());
+ assertTrue("Bukkit." + method.getName() + " must be static!", Modifier.isStatic(mirrorMethod.getModifiers()));
+ }
+ }
+}