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")); }
private async Task AddApplication(AppIdentity appIdentity, string deploymentId, string binariesPath) { StorageAccountConnectionInfo connectionInfo = GetCurrentConnection(); IDeploymentRepository repository = _deploymentRepositoryManager.GetRepository(connectionInfo); BusyWindow busyWindow = new BusyWindow { Message = "Please wait..\n\n" + "The binaries are being uploaded to blob storage" }; busyWindow.Show(); await repository.UploadApplicationBinaries(appIdentity, binariesPath, ConflictResolutionMode.DoNothingIfBinariesExist); busyWindow.Close(); _deploymentConfig = _deploymentConfig.AddApplication(appIdentity, deploymentId); SaveLocalDeploymentConfig(connectionInfo); }