public override ComputerServer MakeServer()
        {
            ComputerServer server;

            var serverRam = new Ram(12);
            var serverHDD = new HardDrive();

            var hardDrives = new List<HardDrive>
                {
                    new HardDrive(
                        0,
                        true,
                        2,
                        new List<HardDrive>
                        { 
                            new HardDrive(1000, false, 0), new HardDrive(1000, false, 0) 
                        })
                };

            var serverCpu = new Cpu(4, 32, serverRam);

            server = new ComputerServer(
                serverCpu,
                serverRam,
                hardDrives,
                serverHDD,
                null, 
                new Videocard(true));

            return server;
        }
        public override ComputerPC MakePC()
        {
            // PC – 64 bit CPU with 2 cores, 4GB RAM, one 2000GB hard drive and monochrome video card.
            var ram = new Ram(4);
            var hardDrive = new HardDrive(2000, false, 0);

            ComputerPC pc = new ComputerPC(new Cpu(2, 64, ram), ram, new[] { new HardDrive(2000, false, 0) }, hardDrive, null, new Videocard(true));
            return pc;
        }
        public override ComputerPC MakePC()
        {
            ComputerPC pc;
            var ram = new Ram(8);
            var hardDrive = new HardDrive();

            pc = new ComputerPC(new Cpu(4, 64, ram), ram, new[] { new HardDrive(1000, false, 0) }, hardDrive, null, new Videocard());
            return pc;
        }
 public ComputerServer(
     Cpu cpu,
     Ram ram,
     IEnumerable<HardDrive> hardDrives,
     HardDrive hardDrive,
     LaptopBattery battery,
     Videocard videocard)
     : base(cpu, ram, hardDrives, hardDrive, battery, videocard)
 {
 }
        public void SqureShouldReturnNumberTooHigh128bit()
        {
            var ram = new Ram(8);
            var cpu = new Cpu(2, 128, ram);

            ram.SaveValue(2001);
            var actual = cpu.SquareNumber();
            var expected = NumTooHigh;

            Assert.AreEqual(expected, actual);
        }
        public void SqureShouldReturnNumberTooLow()
        {
            var ram = new Ram(8);
            var cpu = new Cpu(2, 32, ram);

            ram.SaveValue(-1);
            var actual = cpu.SquareNumber();
            var expected = NumTooLow;

            Assert.AreEqual(expected, actual);
        }
        public void CpuReturnsRandNumberInCorrectInterval()
        {
            int min = 10;
            int max = 100;

            var ram = new Ram(8);
            var cpu = new Cpu(2, 32, ram);

            cpu.Rand(min, max);
            var actual = ram.LoadValue();

            Assert.IsTrue(min <= actual && actual < max);
        }
        public override ComputerLaptop MakeLaptop()
        {
            // Laptop – 64 bit CPU with 2 cores, 16GB RAM, one 1000GB hard drive, colorful video card and laptop battery. 
            var ram = new Ram(16);
            var laptopHDD = new HardDrive();

            ComputerLaptop laptop = new ComputerLaptop(
                new Cpu(2, 64, ram),
                ram,
                new[] { new HardDrive(1000, false, 0) },
                laptopHDD,
                new LaptopBattery(),
                new Videocard());

            return laptop;
        }
        public override ComputerLaptop MakeLaptop()
        {
            ComputerLaptop laptop;

            var ram = new Ram(8);
            var hardDrive = new HardDrive();

            laptop = new ComputerLaptop(
                new Cpu(4, 32, ram),
                ram,
                new[] { new HardDrive(1000, false, 0) },
                hardDrive,
                new LaptopBattery(),
                new Videocard());

            return laptop;
        }
        public override ComputerLaptop MakeLaptop()
        {
            ComputerLaptop laptop;

            var laptopHDD = new HardDrive();
            var ram1 = new Ram(4);

            laptop = new ComputerLaptop(
                new Cpu(2, 64, ram1),
                ram1,
                new[] { new HardDrive(500, false, 0) },
                laptopHDD,
                new LaptopBattery(),
                new Videocard());

            return laptop;
        }
        public override ComputerServer MakeServer()
        {
            // Server – 128 bit CPU with 2 cores, 8GB RAM, one Raid with two 500GB hard drives.
            var ram = new Ram(8);
            var serverHDD = new HardDrive();
            ComputerServer server = new ComputerServer(
                new Cpu(2, 128, ram),
                ram,
                new List<HardDrive>
                {
                        new HardDrive(0, true, 2, new List<HardDrive> { new HardDrive(500, false, 0), new HardDrive(500, false, 0) })
                },
                serverHDD,
                null,
                new Videocard(true));

            return server;
        }
        public override ComputerServer MakeServer()
        {
            ComputerServer server;

            var ram = new Ram(64);
            var serverHDD = new HardDrive();
            server = new ComputerServer(
                new Cpu(8, 64, ram),
                ram,
                new List<HardDrive>
                {
                    new HardDrive(0, true, 2, new List<HardDrive> { new HardDrive(2000, false, 0), new HardDrive(2000, false, 0) })
                },
                serverHDD,
                null,
                new Videocard(true));

            return server;
        }