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); }
public void AddLoad(double load) => VehicleWeightTracker.AddWeight(load);
public void AddPassenger(double passengerWeight) { VehicleWeightTracker.AddWeight(passengerWeight); PassengerTracker.AddPassenger(); }