private void EnsureUsernameNotExists(AuthUsername username) { var authRepository = new SQLServerAuthUserRepository(); var match = authRepository.Search(username); if (!(match is null)) { throw new InvalidUsernameException(username.GetValue()); } }
private void SetData() { SQLServerAuthUserRepository repository = new SQLServerAuthUserRepository(); UserAuthenticator authenticator = new UserAuthenticator(repository); AuthenticateUserCommandHandler handler = new AuthenticateUserCommandHandler(authenticator); var data = new Dictionary <string, object>(); data.Add("handler", handler); login = new Login(data); }
public AuthRespositoryTest() { repository = new SQLServerAuthUserRepository(); authenticator = new UserAuthenticator(repository); handler = new AuthenticateUserCommandHandler(authenticator); }