Example #1
0
 public void TestAddDeploymentForNewApp()
 {
     _deploymentConfig = _deploymentConfig.AddApplication(new AppIdentity("app13", "1.0.13"), "deploymentid13");
     AssertUtils.ContainsSameElementsInAnyOrder(new[] { "app1", "app2", "app3", "app13" },
                                                _deploymentConfig.ListApplications());
     AssertUtils.ContainsSameElementsInAnyOrder(new[] { "1.0.13" }, _deploymentConfig.ListVersions("app13"));
     AssertUtils.ContainsSameElementsInAnyOrder(new[] { "deploymentid13" },
                                                _deploymentConfig.ListDeploymentIds("app13"));
 }
Example #2
0
        private async Task HandleConnectionSelection()
        {
            StorageAccountConnectionInfo connectionInfo = GetCurrentConnection();
            IEnumerable <string>         appIds         = new List <string>();

            try
            {
                _deploymentConfig = await FetchDeploymentConfig(connectionInfo);

                appIds = _deploymentConfig.ListApplications();
            }
            catch (StorageException ex)
            {
                Debug.WriteLine("Failed to fetch the DeploymentConfig file from account " + connectionInfo.AccountName + " Exception: " + ex);
            }

            AppsListView.ItemsSource = appIds;
            RefreshView(appIds);
        }
        public async Task TestGetDeploymentConfigWhenTheFileIsNotThere()
        {
            DeploymentConfig deploymentConfig = await _deploymentRepository.FetchDeploymentConfig();

            Assert.False(deploymentConfig.ListApplications().Any());
        }
Example #4
0
 public void TestListApplications()
 {
     AssertUtils.ContainsSameElementsInAnyOrder(new[] { "app1", "app2", "app3" },
                                                _deploymentConfig.ListApplications());
 }
Example #5
0
 public void TestThatRemoveLastDeploymentAlsoRemovesApplication()
 {
     _deploymentConfig = _deploymentConfig.RemoveApplication(new AppIdentity("app3", "2.0.0-beta"), "deploymentid3");
     AssertUtils.ContainsSameElementsInAnyOrder(new[] { "app1", "app2" }, _deploymentConfig.ListApplications());
 }
Example #6
0
 public void TestThatRemoveLastVersionAlsoRemovesTheApp()
 {
     _deploymentConfig = _deploymentConfig.RemoveApplication(new AppIdentity("app2", "1.0.0"));
     AssertUtils.ContainsSameElementsInAnyOrder(new[] { "app1", "app3" }, _deploymentConfig.ListApplications());
 }
Example #7
0
 public void TestRemoveApplication()
 {
     _deploymentConfig = _deploymentConfig.RemoveApplication("app1");
     AssertUtils.ContainsSameElementsInAnyOrder(new[] { "app2", "app3" }, _deploymentConfig.ListApplications());
 }