示例#1
0
        public async Task Should_Get_ClientProperty()
        {
            var command = ClientViewModelFaker.GenerateSaveClient().Generate();

            await _clientAppService.Save(command);

            var property = ClientViewModelFaker.GenerateSaveProperty(command.ClientId).Generate();

            await _clientAppService.SaveProperty(property);

            _database.Clients.Include(s => s.Properties).FirstOrDefault(s => s.ClientId == command.ClientId)?.Properties.Should().HaveCountGreaterOrEqualTo(1);

            var clientProperties = await _clientAppService.GetProperties(command.ClientId);

            clientProperties.Should().HaveCountGreaterOrEqualTo(1);
        }
示例#2
0
        public async Task <ActionResult <IEnumerable <ClientPropertyViewModel> > > Properties(string client)
        {
            var clients = await _clientAppService.GetProperties(client);

            return(ResponseGet(clients));
        }