public void GlobalSettingsManagerCreateNew() { foreach (string fileName in Data.ValidPublishSettings) { // Prepare GlobalSettingsManager globalSettingsManager = GlobalSettingsManager.CreateFromPublishSettings(Data.AzureAppDir, null, fileName); PublishData expectedPublishSettings = General.DeserializeXmlFile <PublishData>(fileName); // Assert AzureAssert.AreEqualGlobalSettingsManager(new GlobalPathInfo(Data.AzureAppDir), expectedPublishSettings, globalSettingsManager); // Clean globalSettingsManager.DeleteGlobalSettingsManager(); } }
public void GlobalSettingsManagerLoadExisting() { for (var i = 0; i < Data.ValidPublishSettings.Count; i++) { var publishSettingsFile = Data.ValidPublishSettings[i]; // Prepare new ImportAzurePublishSettingsCommand().ImportSubscriptionFile(publishSettingsFile, null); GlobalSettingsManager globalSettingsManager = GlobalSettingsManager.Load(GlobalPathInfo.GlobalSettingsDirectory); PublishData actualPublishSettings = General.DeserializeXmlFile <PublishData>(Path.Combine(GlobalPathInfo.GlobalSettingsDirectory, Resources.PublishSettingsFileName)); PublishData expectedPublishSettings = General.DeserializeXmlFile <PublishData>(publishSettingsFile); // Assert AzureAssert.AreEqualGlobalSettingsManager(new GlobalPathInfo(GlobalPathInfo.GlobalSettingsDirectory), expectedPublishSettings, globalSettingsManager); } }