Example #1
0
 public void BatteryShouldReturn70WhenChargedWith20()
 {
     var battery = new LaptopBattery();
     battery.Charge(20);
     int result = battery.Percentage;
     Assert.AreEqual(70, result);
 }
Example #2
0
 public void BatteryShouldReturn100WhenOverCharged()
 {
     var battery = new LaptopBattery();
     battery.Charge(1000);
     int result = battery.Percentage;
     Assert.AreEqual(100, result);
 }
Example #3
0
 public void BatteryShouldReturn50WhenCreated()
 {
     var battery = new LaptopBattery();
     int result = battery.Percentage;
     Assert.AreEqual(50, result);
 }
Example #4
0
 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;
 }