Create test that AntiBot is not enabled if Settings disable it
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user