コード例 #1
0
        public CustomerAdditionalData GetCustomerAdditionalData(int customerId)
        {
            CustomerAdditionalData result = new CustomerAdditionalData(customerId);

            result.CustomerOrdersCount = _orderRepository.GetCustomerOrders(customerId).Count();

            return(result);
        }
コード例 #2
0
        public void CanGetAdditionalData(int customerId)
        {
            //arrange

            //act
            CustomerAdditionalData result = _target.GetCustomerAdditionalData(customerId);

            //assert
            Assert.Equal(customerId, result.CustomerId);
            Assert.NotEqual(0, result.CustomerOrdersCount);
        }