Exemple #1
0
        public async Task TestSetUp()
        {
            if (Mode == RecordedTestMode.Record || Mode == RecordedTestMode.Playback)
            {
                Initialize();
                subscription = await ArmClient.GetDefaultSubscriptionAsync();

                string groupName = Recording.GenerateAssetName(ResourceGroupPrefix);
                var    resGroup  = (await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, groupName, new ResourceGroupData(Location))).Value;

                configurationStoreName = Recording.GenerateAssetName("testapp-");
                ConfigurationStoreData configurationStoreData = new ConfigurationStoreData(Location, new AppConfigurationSku("Standard"))
                {
                    PublicNetworkAccess = PublicNetworkAccess.Disabled
                };
                var configStore = (await resGroup.GetConfigurationStores().CreateOrUpdateAsync(WaitUntil.Completed, configurationStoreName, configurationStoreData)).Value;
                await configStore.DeleteAsync(WaitUntil.Completed);

                deletedConfigurationStore = ArmClient.GetDeletedConfigurationStoreResource(DeletedConfigurationStoreResource.CreateResourceIdentifier(subscription.Data.SubscriptionId, Location, configurationStoreName));
            }
        }
        public async Task GetTest()
        {
            DeletedConfigurationStoreResource deletedConfigurationStore = await subscription.GetDeletedConfigurationStores().GetAsync(Location, configurationStoreName);

            Assert.AreEqual(deletedConfigurationStore.Data.Name, configurationStoreName);
        }