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); }
internal bool IsWithinBand(WeightInKg weight) { throw new NotImplementedException(); }
public ShippingCostCalculator(IEnumerable <WeightBand> weightBand, WeightInKg boxWeightInKg) { _weightBand = weightBand; _boxWeightInKg = boxWeightInKg; }