use of org.summerb.microservices.users.api.AuthTokenService in project summerb by skarpushin.
the class AuthTokenServiceDbImplTest method testCreateAuthToken_defensive_userNull.
@Test(expected = IllegalArgumentException.class)
public void testCreateAuthToken_defensive_userNull() throws Exception {
AuthTokenService fixture = AuthTokenServiceDbImplFactory.createAuthTokenServiceDbImpl();
fixture.authenticate(null, "", "");
fail();
}
use of org.summerb.microservices.users.api.AuthTokenService in project summerb by skarpushin.
the class AuthTokenServiceDbImplTest method testFindUserAuthTokens_defensive_nullUser.
@Test(expected = IllegalArgumentException.class)
public void testFindUserAuthTokens_defensive_nullUser() throws Exception {
AuthTokenService fixture = AuthTokenServiceDbImplFactory.createAuthTokenServiceDbImpl();
fixture.findUserAuthTokens(null);
fail();
}
use of org.summerb.microservices.users.api.AuthTokenService in project summerb by skarpushin.
the class AuthTokenServiceDbImplTest method testCreateAuthToken_defensive_clientIpNull.
@Test(expected = IllegalArgumentException.class)
public void testCreateAuthToken_defensive_clientIpNull() throws Exception {
AuthTokenService fixture = AuthTokenServiceDbImplFactory.createAuthTokenServiceDbImpl();
fixture.authenticate("", "", null);
fail();
}
use of org.summerb.microservices.users.api.AuthTokenService in project summerb by skarpushin.
the class AuthTokenServiceDbImplTest method testFindUserAuthTokens_whitebox_expectUnexpectedException.
@Test(expected = UserServiceUnexpectedException.class)
public void testFindUserAuthTokens_whitebox_expectUnexpectedException() throws Exception {
AuthTokenService fixture = AuthTokenServiceDbImplFactory.createAuthTokenServiceDbImpl();
fixture.findUserAuthTokens(UserFactory.USER_RESULT_IN_EXCEPTION);
fail();
}
use of org.summerb.microservices.users.api.AuthTokenService in project summerb by skarpushin.
the class AuthTokenServiceDbImplTest method testCreateAuthToken_defensive_passwordNull.
@Test(expected = IllegalArgumentException.class)
public void testCreateAuthToken_defensive_passwordNull() throws Exception {
AuthTokenService fixture = AuthTokenServiceDbImplFactory.createAuthTokenServiceDbImpl();
fixture.authenticate("", null, "");
fail();
}
Aggregations