Esempio n. 1
0
        public async Task GetClienteById_Success()
        {
            var expected = new Business.Models.Cliente
            {
                Id = Guid.NewGuid()
            };

            _clienteRepositoryMock
            .Setup(m => m.ObterPorId(expected.Id))
            .ReturnsAsync(expected);

            var customer = await _clienteService.ObterPorId(expected.Id);

            var actual = customer;

            Assert.Equal(expected, actual);
        }
Esempio n. 2
0
 public void Cadastrar(Guid id)
 {
     try
     {
         var cliente = new Business.Models.Cliente()
         {
             Id        = id,
             Ativo     = true,
             Documento = "123455",
             Nome      = "Cliente Teste"
         };
         clienteService.Cadastrar(cliente).Wait();
     }
     catch (Exception)
     {
         throw;
     }
 }