예제 #1
0
        public void AddWeightTests(double vehicleWeight, double maxWeight, double[] loads)
        {
            VehicleWeightTracker tracker = new VehicleWeightTracker(vehicleWeight, maxWeight);

            foreach (double load in loads)
            {
                tracker.AddWeight(load);
            }

            Assert.True(tracker.TotalWeight <= tracker.MaxWeight);
        }
예제 #2
0
 public void AddLoad(double load) =>
 VehicleWeightTracker.AddWeight(load);
예제 #3
0
 public void AddPassenger(double passengerWeight)
 {
     VehicleWeightTracker.AddWeight(passengerWeight);
     PassengerTracker.AddPassenger();
 }