mirror of https://github.com/beemdevelopment/Aegis
Move Yandex secret validation tests to a different folder
parent
119c3838e1
commit
acfb70c267
@ -0,0 +1,17 @@
|
||||
package com.beemdevelopment.aegis.otp;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import com.beemdevelopment.aegis.crypto.otp.HOTPTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class HotpInfoTest {
|
||||
@Test
|
||||
public void testHotpInfoOtp() throws OtpInfoException {
|
||||
for (int i = 0; i < HOTPTest.VECTORS.length; i++) {
|
||||
HotpInfo info = new HotpInfo(HOTPTest.SECRET, OtpInfo.DEFAULT_ALGORITHM, OtpInfo.DEFAULT_DIGITS, i);
|
||||
assertEquals(HOTPTest.VECTORS[i], info.getOtp());
|
||||
}
|
||||
}
|
||||
}
|
@ -1,21 +1,12 @@
|
||||
package com.beemdevelopment.aegis.otp;
|
||||
|
||||
import com.beemdevelopment.aegis.crypto.otp.HOTPTest;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import com.beemdevelopment.aegis.crypto.otp.TOTPTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class OtpTest {
|
||||
@Test
|
||||
public void testHotpInfoOtp() throws OtpInfoException {
|
||||
for (int i = 0; i < HOTPTest.VECTORS.length; i++) {
|
||||
HotpInfo info = new HotpInfo(HOTPTest.SECRET, OtpInfo.DEFAULT_ALGORITHM, OtpInfo.DEFAULT_DIGITS, i);
|
||||
assertEquals(HOTPTest.VECTORS[i], info.getOtp());
|
||||
}
|
||||
}
|
||||
|
||||
public class TotpInfoTest {
|
||||
@Test
|
||||
public void testTotpInfoOtp() throws OtpInfoException {
|
||||
for (TOTPTest.Vector vector : TOTPTest.VECTORS) {
|
Loading…
Reference in New Issue