示例#1
0
        public async Task LoginAsync_AutenticacaoServico_RespostaDeErrorSeEmailNaoExistir()
        {
            var model = new LoginModel
            {
                Email = _faker.Person.Email,
                Senha = _faker.Internet.Password()
            };

            var authResult = await _autenticacaoServico
                             .LoginAsync(model);

            authResult.Mensagem.Should().Be(Dicionario.ME004);
            authResult.Sucesso.Should().BeFalse();
            authResult.Errors.First().Should().Be(Dicionario.MV001);
        }
示例#2
0
 public async Task <AutenticacaoResult> Handle(LoginCommand request, CancellationToken cancellationToken)
 {
     return(await _autenticacaoServico.LoginAsync(request.Login));
 }