Fixed unittest

This commit is contained in:
Alena Prokharchyk 2014-01-21 20:05:16 -08:00
parent cae19d0b5a
commit 202c18243b

View File

@ -92,11 +92,11 @@ public class AuthenticatorTest {
@Test @Test
public void testAuthentication() throws UnsupportedEncodingException, NoSuchAlgorithmException { public void testAuthentication() throws UnsupportedEncodingException, NoSuchAlgorithmException {
Map<String, Object[]> dummyMap = new HashMap<String, Object[]>(); Map<String, Object[]> dummyMap = new HashMap<String, Object[]>();
assertEquals("32 byte salt authenticated", true, authenticator.authenticate("admin", "password", 0L, dummyMap)); assertEquals("32 byte salt authenticated", true, authenticator.authenticate("admin", "password", 0L, dummyMap).first());
assertEquals("20 byte salt authenticated", true, authenticator.authenticate("admin20Byte", "password", 0L, dummyMap)); assertEquals("20 byte salt authenticated", true, authenticator.authenticate("admin20Byte", "password", 0L, dummyMap).first());
assertEquals("fake user not authenticated", false, authenticator.authenticate("fake", "fake", 0L, dummyMap)); assertEquals("fake user not authenticated", false, authenticator.authenticate("fake", "fake", 0L, dummyMap).first());
assertEquals("bad password not authenticated", false, authenticator.authenticate("admin", "fake", 0L, dummyMap)); assertEquals("bad password not authenticated", false, authenticator.authenticate("admin", "fake", 0L, dummyMap).first());
assertEquals("20 byte user bad password not authenticated", false, authenticator.authenticate("admin20Byte", "fake", 0L, dummyMap)); assertEquals("20 byte user bad password not authenticated", false, authenticator.authenticate("admin20Byte", "fake", 0L, dummyMap).first());
} }
// @Test // @Test