Create test that AntiBot is not enabled if Settings disable it

This commit is contained in:
Lucas Jacques
2015-11-25 19:39:16 +01:00
parent 0065a6a827
commit 37a615fa03
4 changed files with 51 additions and 1 deletions
@@ -2,6 +2,7 @@ package fr.xephi.authme;
import fr.xephi.authme.util.Wrapper;
import org.bukkit.Server;
import org.bukkit.scheduler.BukkitScheduler;
import org.mockito.Mockito;
import java.util.HashMap;
@@ -40,6 +41,11 @@ public class WrapperMock extends Wrapper {
return getMock(AuthMe.class);
}
@Override
public BukkitScheduler getScheduler() {
return getMock(BukkitScheduler.class);
}
@SuppressWarnings("unchecked")
private static <T> T getMock(Class<?> clazz) {
Object o = mocks.get(clazz);