Пример #1
0
        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);
        }
Пример #2
0
 public void BatteryChargeWithNegative100Test()
 {
     var battery = new Battery();
     battery.Charge(-100);
     Assert.AreEqual(0, battery.Percentage);
 }
Пример #3
0
 public void BatteryChargeWith50Test()
 {
     var battery = new Battery();
     battery.Charge(50);
     Assert.AreEqual(100, battery.Percentage);
 }
Пример #4
0
 public void BatteryChargeWith1Test()
 {
     var battery = new Battery();
     battery.Charge(1);
     Assert.AreEqual(51, battery.Percentage);
 }
Пример #5
0
 public void BatteryCreationWith50PercentTest()
 {
     var battery = new Battery();
     Assert.AreEqual(50, battery.Percentage);
 }