Testing - change to non-reflection WrapperMock test setup

Replaced many classes to use Wrapper to get singletons and replaced the test setups to use the WrapperMock instead of setting fields through reflection
This commit is contained in:
ljacqu
2015-11-26 22:53:12 +01:00
parent 77f2f80eaf
commit 210b691353
14 changed files with 69 additions and 57 deletions
@@ -1,6 +1,7 @@
package fr.xephi.authme.util;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.cache.auth.PlayerCache;
import fr.xephi.authme.settings.Messages;
import org.bukkit.Bukkit;
import org.bukkit.Server;
@@ -55,6 +56,10 @@ public class Wrapper {
return getAuthMe().getMessages();
}
public PlayerCache getPlayerCache() {
return PlayerCache.getInstance();
}
/**
* Return the folder containing plugin data via the AuthMe instance.
*