public void ChargeShoudSubstractToPercentageWhenGivenNegativeNumber() { var battery = new LaptopBattery(); battery.Percentage = LaptopBattery.DefaultBatteryChargeValue; battery.Charge(-10); Assert.AreEqual(40, battery.Percentage); }
public void ChargeShoudNotAddToPercentageWhenGivenPositiveNumberAndPrcIs100() { var battery = new LaptopBattery(); battery.Percentage = LaptopBattery.BatteryMaxValue; battery.Charge(10); Assert.AreEqual(LaptopBattery.BatteryMaxValue, battery.Percentage); }
public void ChargeShoudNotSubstractToPercentageWhenGivenNegativeNumberAndPRCis0() { var battery = new LaptopBattery(); battery.Percentage = LaptopBattery.BatteryMinValue; battery.Charge(-10); Assert.AreEqual(LaptopBattery.BatteryMinValue, battery.Percentage); }
public void ChargeShoudAddToPercentageWhenGivenPositiveNumber() { var battery = new LaptopBattery(); battery.Percentage = 50; battery.Charge(10); Assert.AreEqual(60, battery.Percentage); }