Microsoft.WindowsAzure.Commands.Test.Utilities.Common.AzureAssert.AzureServiceExists C# (CSharp) Method

AzureServiceExists() public static method

public static AzureServiceExists ( string serviceRootPath, string scaffoldFilePath, string serviceName, ServiceSettings settings = null, WebRoleInfo webRoles = null, WorkerRoleInfo workerRoles = null, string webScaff = null, string workerScaff = null, RoleInfo roles = null ) : void
serviceRootPath string
scaffoldFilePath string
serviceName string
settings ServiceSettings
webRoles WebRoleInfo
workerRoles WorkerRoleInfo
webScaff string
workerScaff string
roles RoleInfo
return void
        public static void AzureServiceExists(string serviceRootPath, string scaffoldFilePath, string serviceName, ServiceSettings settings = null, WebRoleInfo[] webRoles = null, WorkerRoleInfo[] workerRoles = null, string webScaff = null, string workerScaff = null, RoleInfo[] roles = null)
        {
            ServiceComponents components = new ServiceComponents(new PowerShellProjectPathInfo(serviceRootPath));

            ScaffoldingExists(serviceRootPath, scaffoldFilePath);

            if (webRoles != null)
            {
                for (int i = 0; i < webRoles.Length; i++)
                {
                    ScaffoldingExists(Path.Combine(serviceRootPath, webRoles[i].Name), webScaff);
                }
            }

            if (workerRoles != null)
            {
                for (int i = 0; i < workerRoles.Length; i++)
                {
                    ScaffoldingExists(Path.Combine(serviceRootPath, workerRoles[i].Name), workerScaff);
                }
            }

            AreEqualServiceConfiguration(components.LocalConfig, serviceName, roles);
            AreEqualServiceConfiguration(components.CloudConfig, serviceName, roles);
            IsValidServiceDefinition(components.Definition, serviceName, webRoles, workerRoles);
            AreEqualServiceSettings(settings ?? new ServiceSettings(), components.Settings);
        }