Пример #1
0
        private WeightInKg GetTotalWeight(IEnumerable <Consignment> consignments)
        {
            var totalWeight = new WeightInKg(0m);

            // Calculate the weight of the items
            foreach (Consignment consignment in consignments)
            {
                totalWeight = totalWeight.Add(consignment.ConsignmentWeight());
            }
            // Add a box weight
            totalWeight = totalWeight.Add(_boxWeightInKg);
            return(totalWeight);
        }
Пример #2
0
 internal bool IsWithinBand(WeightInKg weight)
 {
     throw new NotImplementedException();
 }
Пример #3
0
 public ShippingCostCalculator(IEnumerable <WeightBand> weightBand, WeightInKg boxWeightInKg)
 {
     _weightBand = weightBand; _boxWeightInKg = boxWeightInKg;
 }