Fix VerificationCommandTest sometimes failing

- Need to set up ConsoleLogger to avoid NPE, didn't always happen because if all tests are run in a batch another test will initialize it
This commit is contained in:
ljacqu 2018-09-09 15:47:52 +02:00
parent ee764c0a6e
commit 44763a055f

View File

@ -1,9 +1,11 @@
package fr.xephi.authme.command.executable.verification; package fr.xephi.authme.command.executable.verification;
import fr.xephi.authme.TestHelper;
import fr.xephi.authme.data.VerificationCodeManager; import fr.xephi.authme.data.VerificationCodeManager;
import fr.xephi.authme.message.MessageKey; import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.service.CommonService; import fr.xephi.authme.service.CommonService;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.mockito.InjectMocks; import org.mockito.InjectMocks;
@ -33,6 +35,11 @@ public class VerificationCommandTest {
@Mock @Mock
private VerificationCodeManager codeManager; private VerificationCodeManager codeManager;
@BeforeClass
public static void setUpLogger() {
TestHelper.setupLogger();
}
@Test @Test
public void shouldDetectIfMailHasASetup() { public void shouldDetectIfMailHasASetup() {
// given // given