Exemplo n.º 1
0
        public async Task GetClient_Test()
        {
            // Act
            // Create record Manually
            var newClient = new Client
            {
                Name     = "Sergio Peralta",
                Email    = "*****@*****.**",
                Code     = "AAA132",
                Celphone = "99989292",
                Phone    = "1231312",
                Sexo     = Sexo.Masculino,
            };

            await UsingDbContextAsync(async context =>
            {
                context.Client.Add(newClient);
                await context.SaveChangesAsync();
            });

            var input = new GetClientInput
            {
                Id = 1
            };

            //Arrage
            var output = await _clientAppService.GetClient(input);

            // Assert
            output.ShouldNotBeNull();
        }
Exemplo n.º 2
0
        public ClientDto GetClientDocuments(GetClientInput input)
        {
            var client = _clientManager.GetClient(input.Id);

            var obj = ObjectMapper.Map <ClientDto>(client);

            return(obj);
        }
Exemplo n.º 3
0
        public async Task <ClientDto> GetClient(GetClientInput input)
        {
            var client = await _clientManager.GetClient(input.Id);

            return(MapToEntityDto(client));
        }