public async void Initialize_Database_Server_Infrastructure()
        {
            Log.Logger.Information($"Begin of Initialize_Database_Server_Infrastructure()." +
                                   $"{Environment.NewLine}Construct CloudService DB server.");

            var cloudServiceDb = new CloudService <IDatabaseServer>
            {
                Provider = new Provider {
                    Name = "IGS"
                },
                Infrastructure = new Infrastructure {
                    Name = "Test"
                },
                ResourceInstance = new ResourceInstance {
                    Name = "SQL Server Test"
                }
            };

            cloudServiceDb.ResourceFile = new ResourceFile <IDatabaseServer>
            {
                Name    = cloudServiceDb.Infrastructure.Name + "_SERVER.json",
                Content = new MsSqlServer
                {
                    Name         = "MS SQL Server for Pre-Production Testing",
                    InstanceType = InstanceType.Large,
                    Memory       = new Memory {
                        Size = 64, SpaceSizeUnit = SizeUnit.GiB
                    },
                    NetworkPerformance = Performance.High,
                    Storage            = new Storage
                    {
                        Size = 100, SpaceSizeUnit = SizeUnit.GiB, VolumeType = VolumeType.Extension
                    },
                    Vendor  = "Microsoft",
                    Version = 2016
                }
            };

            var infrastructureOperationSqlServer = new InfrastructureOperation(
                new FindInfrastructure(Log.Logger, @"C:\\GeeksCloudService"), Log.Logger);

            Log.Logger.Information($"Begin of InitializeAsync method() of unit testing.");

            await infrastructureOperationSqlServer.InitializeAsync(cloudServiceDb);

            Log.Logger.Information($"End of InitializeAsync method() of unit testing.");
        }
        public async void Initialize_VirtualMachine_Infrastructure()
        {
            Log.Logger.Information($"Begin of Initialize_VirtualMachine_Infrastructure()." +
                                   $"{Environment.NewLine}Construct CloudService VM.");
            //Arrange
            var cloudServiceVm = new CloudService <IVirtualMachine>
            {
                Provider = new Provider {
                    Name = "IGS"
                },
                Infrastructure = new Infrastructure {
                    Name = "UAT"
                },
                ResourceInstance = new ResourceInstance {
                    Name = "Windows-Dev-VM"
                }
            };

            Log.Logger.Information($"Set ResourceFile property of CloudService VM.");
            cloudServiceVm.ResourceFile = new ResourceFile <IVirtualMachine>
            {
                Name    = cloudServiceVm.Infrastructure.Name + "_SERVER.json",
                Content = new VirtualMachine
                {
                    Name            = "Windows Server 2016 R2 Dev. Virtual Machine",
                    OperatingSystem = new WindowsOperatingSystem
                    {
                        Name         = "Windows Server 2016 R2",
                        Version      = 10,
                        Vendor       = "Microsoft",
                        Architecture = OperatingSystemArchitecture.SixtyFour,
                        Applications = new List <string> {
                            "MS Office", "Visual Studio", "Firefox", "IIS"
                        }
                    },
                    Storage = new Storage
                    {
                        Size          = 100,
                        SpaceSizeUnit = SizeUnit.GiB,
                        VolumeType    = VolumeType.Root
                    },
                    Processor = new Processor
                    {
                        Cores = 8,
                        Speed = 260
                    },
                    Memory = new Memory
                    {
                        Size          = 32,
                        SpaceSizeUnit = SizeUnit.GiB
                    },
                    NetworkPerformance = Performance.High,
                    InstanceType       = InstanceType.Large,
                    Tag = "Dev VM"
                }
            };

            var infrastructureOperationVm = new InfrastructureOperation(
                new FindInfrastructure(Log.Logger, @"C:\\GeeksCloudService"), Log.Logger);

            Log.Logger.Information($"Begin of InitializeAsync method() of unit testing.");

            //Act
            await infrastructureOperationVm.InitializeAsync(cloudServiceVm);

            Log.Logger.Information($"End of InitializeAsync method() of unit testing.");
        }
        public async void Initialize_Two_Infrastructures_Different_Providers()
        {
            Log.Logger.Information($"Begin of Initialize_Two_Infrastructures_Different_Providers()." +
                                   $"{Environment.NewLine}Construct CloudService VM.");

            var infrastructuresList = new List <Task>();

            #region cloudServiceVm

            var cloudServiceVm = new CloudService <IVirtualMachine>
            {
                Provider = new Provider {
                    Name = "IGS"
                },
                Infrastructure = new Infrastructure {
                    Name = "UAT"
                },
                ResourceInstance = new ResourceInstance {
                    Name = "Windows-Dev-VM"
                }
            };

            cloudServiceVm.ResourceFile = new ResourceFile <IVirtualMachine>
            {
                Name    = cloudServiceVm.Infrastructure.Name + "_SERVER.json",
                Content = new VirtualMachine
                {
                    Name            = "Windows Server 2016 R2 Dev. Virtual Machine",
                    OperatingSystem = new WindowsOperatingSystem
                    {
                        Name         = "Windows Server 2016 R2",
                        Version      = 10,
                        Vendor       = "Microsoft",
                        Architecture = OperatingSystemArchitecture.SixtyFour,
                        Applications = new List <string> {
                            "MS Office", "Visual Studio", "Firefox", "IIS"
                        }
                    },
                    Storage = new Storage
                    {
                        Size          = 100,
                        SpaceSizeUnit = SizeUnit.GiB,
                        VolumeType    = VolumeType.Root
                    },
                    Processor = new Processor
                    {
                        Cores = 8,
                        Speed = 260
                    },
                    Memory = new Memory
                    {
                        Size          = 32,
                        SpaceSizeUnit = SizeUnit.GiB
                    },
                    NetworkPerformance = Performance.High,
                    InstanceType       = InstanceType.Large,
                    Tag = "Dev VM"
                }
            };

            Log.Logger.Information($"Begin of InitializeAsync method() of unit testing.");
            var infrastructureOperationVM = new InfrastructureOperation(
                new FindInfrastructure(Log.Logger, @"C:\\GeeksCloudService"), Log.Logger);
            Log.Logger.Information($"End of InitializeAsync method() of unit testing.");

            infrastructuresList.Add(infrastructureOperationVM.InitializeAsync(cloudServiceVm));

            #endregion

            #region cloudServiceDbServer

            Log.Logger.Information($"Construct CloudService Sql Server.");
            var cloudServiceDbServer = new CloudService <IDatabaseServer>
            {
                Provider = new Provider {
                    Name = "SAMS"
                },
                Infrastructure = new Infrastructure {
                    Name = "Test"
                },
                ResourceInstance = new ResourceInstance {
                    Name = "SQL Server Test"
                }
            };

            cloudServiceDbServer.ResourceFile = new ResourceFile <IDatabaseServer>
            {
                Name    = cloudServiceDbServer.Infrastructure.Name + "_SERVER.json",
                Content = new MsSqlServer
                {
                    Name         = "MS SQL Server for Pre-Production Testing",
                    InstanceType = InstanceType.Large,
                    Memory       = new Memory {
                        Size = 64, SpaceSizeUnit = SizeUnit.GiB
                    },
                    NetworkPerformance = Performance.High,
                    Storage            = new Storage
                    {
                        Size = 100, SpaceSizeUnit = SizeUnit.GiB, VolumeType = VolumeType.Extension
                    },
                    Vendor  = "Microsoft",
                    Version = 2016
                }
            };

            var infrastructureOperationSqlServer = new InfrastructureOperation(
                new FindInfrastructure(Log.Logger, @"C:\\GeeksCloudService"), Log.Logger);

            Log.Logger.Information($"Begin of InitializeAsync method() of unit testing.");
            infrastructuresList.Add(infrastructureOperationSqlServer.InitializeAsync(cloudServiceDbServer));
            Log.Logger.Information($"End of InitializeAsync method() of unit testing.");

            #endregion

            await Task.WhenAll(infrastructuresList);
        }