public void DeleteDeployment_CallsAzureApiCorrectlyWhenDeploymentDoesntExist()
        {
            var sim = new SimulatedAzureManagementApi
            {
                ExpectedDeploymentUri = TestDeploymentUri,
                CurrentState = AzureDeploymentCheckOutcome.NotFound,
            };

            IAzureDeploymentSlot deploymentSlot = new AzureDeploymentSlot(
                sim,
                TestDeploymentUri);

            deploymentSlot.DeleteDeployment();
            Assert.That(sim.CurrentState, Is.EqualTo(AzureDeploymentCheckOutcome.NotFound), "deployment was deleted");
            Assert.That(sim.WaitCompleted, Is.True, "waited for delete to finish");
        }
        public void CreateDeployment_CallsAzureApiCorrectlyWhenDeploymentDoesntExist()
        {
            var sim = new SimulatedAzureManagementApi
            {
                ExpectedDeploymentUri = TestDeploymentUri,
                CurrentState = AzureDeploymentCheckOutcome.NotFound,
            };

            IAzureDeploymentSlot deploymentSlot = new AzureDeploymentSlot(
                sim,
                TestDeploymentUri);

            var configuration = MockRepository.GenerateStub<IDeploymentConfiguration>();
            deploymentSlot.CreateOrReplaceDeployment(configuration);

            Assert.That(sim.LastDeploymentConfiguration, Is.SameAs(configuration));

            Assert.That(sim.CurrentState, Is.EqualTo(AzureDeploymentCheckOutcome.Running), "deployment was started");
            Assert.That(sim.WaitCompleted, Is.True, "waited for delete to finish");
        }