Exemplo n.º 1
0
        private void EnsureUsernameNotExists(AuthUsername username)
        {
            var authRepository = new SQLServerAuthUserRepository();
            var match          = authRepository.Search(username);

            if (!(match is null))
            {
                throw new InvalidUsernameException(username.GetValue());
            }
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public AuthRespositoryTest()
 {
     repository    = new SQLServerAuthUserRepository();
     authenticator = new UserAuthenticator(repository);
     handler       = new AuthenticateUserCommandHandler(authenticator);
 }