private static void CheckTheManufacturer(string manufacturer, ref PersonalComputer pc, ref Laptop laptop, ref Server server)
        {
            if (manufacturer == "HP")
            {
                var hpManufacturer = new HPManufacturer();
                var factoryManager = new FactoryManager(hpManufacturer);

                pc = factoryManager.MakePersonalComputer();
                laptop = factoryManager.MakeLaptop();
                server = factoryManager.MakeServer();
            }
            else if (manufacturer == "Dell")
            {
                var dellManufacturer = new DellManufacturer();
                var factoryManager = new FactoryManager(dellManufacturer);

                pc = factoryManager.MakePersonalComputer();
                laptop = factoryManager.MakeLaptop();
                server = factoryManager.MakeServer();
            }
            else if (manufacturer == "Lenovo")
            {
                var lenovoManufacturer = new LenovoManufacturer();
                var factoryManager = new FactoryManager(lenovoManufacturer);

                pc = factoryManager.MakePersonalComputer();
                laptop = factoryManager.MakeLaptop();
                server = factoryManager.MakeServer();
            }
            else
            {
                throw new ArgumentException("Invalid manufacturer!");
            }
        }
        public void BatteryChargeTest_FullEmptyTheBatteryWith200_MustReturnZero()
        {
            var dellManufacturer = new DellManufacturer();
            var factoryManager = new FactoryManager(dellManufacturer);

            var laptop = factoryManager.MakeLaptop();

            laptop.LaptopBattery.Charge(-200);

            var result = laptop.LaptopBattery.Percentage;

            Assert.AreEqual(0, result);
        }
        public void BatteryChargeTest_OverchargeWith200Percents_MustReturn100()
        {
            var dellManufacturer = new DellManufacturer();
            var factoryManager = new FactoryManager(dellManufacturer);

            var laptop = factoryManager.MakeLaptop();

            laptop.LaptopBattery.Charge(200);

            var result = laptop.LaptopBattery.Percentage;

            Assert.AreEqual(100, result);
        }
        public void BatteryChargeTest_FullChargingTheBatteryFromZero_MustReturn100()
        {
            var dellManufacturer = new DellManufacturer();
            var factoryManager = new FactoryManager(dellManufacturer);

            var laptop = factoryManager.MakeLaptop();

            laptop.LaptopBattery.Charge(-200);
            laptop.LaptopBattery.Charge(100);

            var result = laptop.LaptopBattery.Percentage;

            Assert.AreEqual(100, result);
        }