public void TestCheckStatus2()
 {
     Uri packageUrl = Blob.GetUrl("bzytasksweurosys", "mydeployments", "20111207_015202_Beazley.Tasks.Azure.cspkg");
     IDeployment deployment = new Deployment();
     string createRequestId = deployment.CreateRequest(
         WindowsAzureAccount.SubscriptionId,
         WindowsAzureAccount.CertificateThumbprint,
         "BeazleyTasks-WEuro-Sys",
         DeploymentSlot.Production,
         "DeploymentName",
         packageUrl,
         "DeploymentLabel",
         "ServiceConfiguration.Cloud-SysTest.cscfg",
         true,
         true);
     IOperation operation = new Operation();
     OperationResult operationResult1 = operation.StatusCheck(
         WindowsAzureAccount.SubscriptionId,
         WindowsAzureAccount.CertificateThumbprint,
         createRequestId);
     Assert.IsNotNull(operationResult1);
     System.Threading.Thread.Sleep(5000);
     OperationResult operationResult2 = operation.StatusCheck(
         WindowsAzureAccount.SubscriptionId,
         WindowsAzureAccount.CertificateThumbprint,
         createRequestId);
     Assert.IsNotNull(operationResult2);
 }
 public void TestDeleteRequest()
 {
     IDeployment deployment = new Deployment();
     deployment.DeleteRequest(
         WindowsAzureAccount.SubscriptionId,
         WindowsAzureAccount.CertificateThumbprint,
         "BeazleyTasks-WEuro-Sys",
         DeploymentSlot.Production);
 }
 public void TestGetInformation()
 {
     IDeployment deployment = new Deployment();
     XDocument informationXml = deployment.GetInformation(
         WindowsAzureAccount.SubscriptionId,
         WindowsAzureAccount.CertificateThumbprint,
         "beazleyrisksweb-weuro-sys",
         DeploymentSlot.Production);
     Assert.IsNotNull(informationXml);
 }
 public void TestCheckExists()
 {
     IDeployment deployment = new Deployment();
     bool result = deployment.CheckExists(
         WindowsAzureAccount.SubscriptionId,
         WindowsAzureAccount.CertificateThumbprint,
         "BeazleyTasks-WEuro-Sys",
         DeploymentSlot.Production);
     Assert.IsFalse(result);
 }
 public void TestCheckStatus1()
 {
     IDeployment deployment = new Deployment();
     string deleteRequestId = deployment.DeleteRequest(
         WindowsAzureAccount.SubscriptionId,
         WindowsAzureAccount.CertificateThumbprint,
         "BeazleyTasks-WEuro-Sys",
         DeploymentSlot.Production);
     IOperation operation = new Operation();
     OperationResult operationResult = operation.StatusCheck(
         WindowsAzureAccount.SubscriptionId,
         WindowsAzureAccount.CertificateThumbprint,
         deleteRequestId);
     Assert.IsNotNull(operationResult);
 }
 public void TestCreateRequest()
 {
     Uri packageUrl = Blob.GetUrl("bzytasksweurosys", "mydeployments", "20111207_015202_Beazley.Tasks.Azure.cspkg");
     IDeployment deployment = new Deployment();
     deployment.CreateRequest(
         WindowsAzureAccount.SubscriptionId,
         WindowsAzureAccount.CertificateThumbprint,
         "BeazleyTasks-WEuro-Sys",
         DeploymentSlot.Production,
         "Bad Deployment Name",
         packageUrl,
         "DeploymentLabel",
         "ServiceConfiguration.Cloud-SysTest.cscfg",
         true,
         true);
 }
        public void TestGetConfigurationAndChangeConfiguration()
        {
            IDeployment deployment = new Deployment();
            XDocument configurationXml = deployment.GetConfiguration(
                WindowsAzureAccount.SubscriptionId,
                WindowsAzureAccount.CertificateThumbprint,
                "BeazleyMarketingProfiles-WEuro-Sys",
                DeploymentSlot.Production);
            Assert.IsNotNull(configurationXml);

            string requestId = deployment.ChangeConfiguration(
                WindowsAzureAccount.SubscriptionId,
                WindowsAzureAccount.CertificateThumbprint,
                "BeazleyMarketingProfiles-WEuro-Sys",
                DeploymentSlot.Production,
                configurationXml,
                true,
                "Auto");
            Assert.IsNotNull(requestId);
        }
 public void TestGetInstanceSize()
 {
     IDeployment deployment = new Deployment();
     string instanceSize = deployment.GetInstanceSize(
         WindowsAzureAccount.SubscriptionId,
         WindowsAzureAccount.CertificateThumbprint,
         "beazleyrisksweb-weuro-sys",
         DeploymentSlot.Production,
         "Beazley.Risks.Web.Services");
     Assert.AreEqual("ExtraSmall", instanceSize);
 }
 public void TestHorizontallyScale()
 {
     IDeployment deployment = new Deployment();
     string requestId = deployment.HorizontallyScale(
         WindowsAzureAccount.SubscriptionId,
         WindowsAzureAccount.CertificateThumbprint,
         "BeazleyMarketingProfiles-WEuro-Sys",
         DeploymentSlot.Production,
         new[] { new HorizontalScale { InstanceCount = 2, RoleName = "Beazley.Marketing.Profiles.Endpoint" } },
         true,
         "Auto");
     Assert.IsNotNull(requestId);
 }