Fix null pointer in tests
This commit is contained in:
parent
fab13c586f
commit
120e69ac67
@ -2,15 +2,15 @@ package fr.xephi.authme.security.crypts;
|
|||||||
|
|
||||||
import fr.xephi.authme.settings.Settings;
|
import fr.xephi.authme.settings.Settings;
|
||||||
import fr.xephi.authme.util.WrapperMock;
|
import fr.xephi.authme.util.WrapperMock;
|
||||||
import org.junit.Before;
|
import org.junit.BeforeClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for {@link BCRYPT}.
|
* Test for {@link BCRYPT}.
|
||||||
*/
|
*/
|
||||||
public class BcryptTest extends AbstractEncryptionMethodTest {
|
public class BcryptTest extends AbstractEncryptionMethodTest {
|
||||||
|
|
||||||
@Before
|
@BeforeClass
|
||||||
public void setUpSettings() {
|
public static void setUpSettings() {
|
||||||
WrapperMock.createInstance();
|
WrapperMock.createInstance();
|
||||||
Settings.bCryptLog2Rounds = 8;
|
Settings.bCryptLog2Rounds = 8;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,18 @@
|
|||||||
package fr.xephi.authme.security.crypts;
|
package fr.xephi.authme.security.crypts;
|
||||||
|
|
||||||
|
import fr.xephi.authme.util.WrapperMock;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for {@link XFBCRYPT}.
|
* Test for {@link XFBCRYPT}.
|
||||||
*/
|
*/
|
||||||
public class XFBCRYPTTest extends AbstractEncryptionMethodTest {
|
public class XFBCRYPTTest extends AbstractEncryptionMethodTest {
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
|
public static void setUpWrapper() {
|
||||||
|
WrapperMock.createInstance();
|
||||||
|
}
|
||||||
|
|
||||||
public XFBCRYPTTest() {
|
public XFBCRYPTTest() {
|
||||||
super(new XFBCRYPT(),
|
super(new XFBCRYPT(),
|
||||||
"$2a$10$UtuON/ZG.x8EWG/zQbryB.BHfQVrfxk3H7qykzP.UJQ8YiLjZyfqq", // password
|
"$2a$10$UtuON/ZG.x8EWG/zQbryB.BHfQVrfxk3H7qykzP.UJQ8YiLjZyfqq", // password
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user