コード例 #1
0
        public void It_should_throw_invalid_operation_exception()
        {
            // Arrange

            var customers = new Domain.Customer.Customer[]
            {
                new FakeCustomer("Fake 1", "Green", _address),
            };

            // Assert

            Assert.Catch <InvalidOperationException>(() => _customerResponseFactory.Create(customers));
        }
コード例 #2
0
        public async Task <BaseCustomerDto[]> GetCustomers()
        {
            var customers = await _customerRepository.GetAll();

            return(_customerResponseFactory.Create(customers));
        }