예제 #1
0
        public async void IncluirUsuario()
        {
            var mockRepo = new Mock <IUsuarioRepositorio>();

            mockRepo.Setup(x => x.Incluir("thamy", "*****@*****.**", "1234"))
            .Returns(Task.FromResult(true));

            var usuarioAplicacao = new UsuarioAplicacao(mockRepo.Object, mockToken.Object);
            var retorno          = await usuarioAplicacao.Incluir(new UsuarioViewModel()
            {
                Nome  = "thamy",
                Email = "*****@*****.**",
                Senha = "1234"
            });

            Assert.True(retorno);
        }