[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.

This commit is contained in:
Celtic Minstrel
2012-02-25 12:39:10 -05:00
committed by EvilSeph
parent 27d98788cc
commit 9b5feab9c8
2 changed files with 55 additions and 4 deletions

View File

@@ -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()));
}
}
}