public void BatteryShouldReturn70WhenChargedWith20() { var battery = new LaptopBattery(); battery.Charge(20); int result = battery.Percentage; Assert.AreEqual(70, result); }
public void BatteryShouldReturn100WhenOverCharged() { var battery = new LaptopBattery(); battery.Charge(1000); int result = battery.Percentage; Assert.AreEqual(100, result); }
public void BatteryShouldReturn50WhenCreated() { var battery = new LaptopBattery(); int result = battery.Percentage; Assert.AreEqual(50, result); }
public LaptopComputer(IMotherboard motherboard, Cpu cpu, Ram ram, IEnumerable<HardDrive> hardDrives, IVideoCard videoCard, Battery.LaptopBattery battery) : base(ComputerType.LAPTOP, motherboard, cpu, ram, hardDrives, videoCard) { this.battery = battery; }