mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-16 15:25:22 +01:00
Fix unit testing
whoops
This commit is contained in:
parent
6e16abc34e
commit
d533f8e19c
@ -216,18 +216,16 @@ public class PurgeTaskTest {
|
||||
|
||||
private void setPermissionsBehavior() {
|
||||
given(permissionsManager.hasPermissionOffline(any(OfflinePlayer.class), eq(BYPASS_NODE)))
|
||||
.willAnswer(new Answer<Boolean>() {
|
||||
@Override
|
||||
public Boolean answer(InvocationOnMock invocationOnMock) throws Throwable {
|
||||
OfflinePlayer player = invocationOnMock.getArgument(0);
|
||||
Boolean hasPermission = playerBypassAssignments.get(player);
|
||||
if (hasPermission == null) {
|
||||
throw new IllegalStateException("Unexpected check of '" + BYPASS_NODE
|
||||
+ "' with player = " + player);
|
||||
}
|
||||
return hasPermission;
|
||||
.willAnswer((Answer<Boolean>) invocationOnMock -> {
|
||||
OfflinePlayer player = invocationOnMock.getArgument(0);
|
||||
Boolean hasPermission = playerBypassAssignments.get(player);
|
||||
if (hasPermission == null) {
|
||||
throw new IllegalStateException("Unexpected check of '" + BYPASS_NODE
|
||||
+ "' with player = " + player);
|
||||
}
|
||||
return hasPermission;
|
||||
});
|
||||
given(permissionsManager.loadUserData(any(OfflinePlayer.class))).willReturn(true);
|
||||
}
|
||||
|
||||
private void assertRanPurgeWithPlayers(OfflinePlayer... players) {
|
||||
|
Loading…
Reference in New Issue
Block a user