public override Laptop MakeLaptop() { var laptopRam = new Ram(4); var laptopVideoCard = new VideoCard(false); var motherBoear = new Motherboard(laptopRam, laptopVideoCard); var laptopCpu = new Cpu(new Cpu64(), 2, motherBoear); var laptopHDD = new HardDriver(); var laptopHardDrives = new List<HardDriver> { new HardDriver(500, false, 0) }; var laptopBattery = new Battery(); return new Laptop(laptopCpu, laptopRam, laptopVideoCard, laptopHDD, laptopHardDrives, laptopBattery); }
public void BatteryChargeWithNegative100Test() { var battery = new Battery(); battery.Charge(-100); Assert.AreEqual(0, battery.Percentage); }
public void BatteryChargeWith50Test() { var battery = new Battery(); battery.Charge(50); Assert.AreEqual(100, battery.Percentage); }
public void BatteryChargeWith1Test() { var battery = new Battery(); battery.Charge(1); Assert.AreEqual(51, battery.Percentage); }
public void BatteryCreationWith50PercentTest() { var battery = new Battery(); Assert.AreEqual(50, battery.Percentage); }