public CustomerAdditionalData GetCustomerAdditionalData(int customerId) { CustomerAdditionalData result = new CustomerAdditionalData(customerId); result.CustomerOrdersCount = _orderRepository.GetCustomerOrders(customerId).Count(); return(result); }
public void CanGetAdditionalData(int customerId) { //arrange //act CustomerAdditionalData result = _target.GetCustomerAdditionalData(customerId); //assert Assert.Equal(customerId, result.CustomerId); Assert.NotEqual(0, result.CustomerOrdersCount); }