mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-23 02:35:11 +01:00
Fix limbo service unit test
This commit is contained in:
parent
cd4693eedf
commit
4cbfc8a812
@ -19,6 +19,8 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@ -32,6 +34,7 @@ import static org.junit.Assert.assertThat;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.Mockito.doAnswer;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.only;
|
||||
import static org.mockito.Mockito.verify;
|
||||
@ -80,6 +83,14 @@ public class LimboServiceTest {
|
||||
given(settings.getProperty(RestrictionSettings.ALLOW_UNAUTHED_MOVEMENT)).willReturn(false);
|
||||
}
|
||||
|
||||
@Before
|
||||
public void mockBukkitService() {
|
||||
doAnswer(invocation -> {
|
||||
((Runnable) invocation.getArguments()[0]).run();
|
||||
return null;
|
||||
}).when(bukkitService).runTask(any(Runnable.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldCreateLimboPlayer() {
|
||||
// given
|
||||
|
Loading…
Reference in New Issue
Block a user