Fix null pointer in tests

This commit is contained in:
ljacqu 2016-01-07 20:49:41 +01:00
parent fab13c586f
commit 120e69ac67
2 changed files with 11 additions and 3 deletions

View File

@ -2,15 +2,15 @@ package fr.xephi.authme.security.crypts;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.util.WrapperMock;
import org.junit.Before;
import org.junit.BeforeClass;
/**
* Test for {@link BCRYPT}.
*/
public class BcryptTest extends AbstractEncryptionMethodTest {
@Before
public void setUpSettings() {
@BeforeClass
public static void setUpSettings() {
WrapperMock.createInstance();
Settings.bCryptLog2Rounds = 8;
}

View File

@ -1,10 +1,18 @@
package fr.xephi.authme.security.crypts;
import fr.xephi.authme.util.WrapperMock;
import org.junit.BeforeClass;
/**
* Test for {@link XFBCRYPT}.
*/
public class XFBCRYPTTest extends AbstractEncryptionMethodTest {
@BeforeClass
public static void setUpWrapper() {
WrapperMock.createInstance();
}
public XFBCRYPTTest() {
super(new XFBCRYPT(),
"$2a$10$UtuON/ZG.x8EWG/zQbryB.BHfQVrfxk3H7qykzP.UJQ8YiLjZyfqq", // password