示例#1
0
 public void ChargeBatteryWith50PercentShouldReturn100()
 {
     var battery = new LaptopBattery();
     battery.ChargeBattery(50);
     Assert.AreEqual(100, battery.CurrentBatteryLife);
 }
示例#2
0
 public void ChargeBatteryWithMinus70PercentShouldReturn0()
 {
     var battery = new LaptopBattery();
     battery.ChargeBattery(-70);
     Assert.AreEqual(0, battery.CurrentBatteryLife);
 }
示例#3
0
 public Laptop(CentralProcessingUnit processor, RamMemory ramMemory, HardDrive hardDrives, VideoCard videoCard, LaptopBattery battery)
     : base(processor, ramMemory, hardDrives, videoCard)
 {
     this.Battery = battery;
 }