public void ChangeAllProperties() { using (HttpClient client = ApiHttpClient.Create($"{Globals.TEST_SERVER}:{Globals.TEST_PORT}")) { // Web Server Scope JObject webServerFeature = GetCompressionFeature(client, null, null); ChangeAndRestoreProps(client, webServerFeature); // Site Scope Sites.EnsureNoSite(client, TEST_SITE_NAME); JObject site = Sites.CreateSite(client, TEST_SITE_NAME, 53010, @"c:\sites\test_site"); JObject siteFeature = GetCompressionFeature(client, site.Value <string>("name"), null); ChangeAndRestoreProps(client, siteFeature); // Application Scope JObject app = Applications.CreateApplication(client, "test_app", @"c:\sites\test_site\test_application", site); JObject appFeature = GetCompressionFeature(client, site.Value <string>("name"), app.Value <string>("path")); Assert.NotNull(appFeature); ChangeAndRestoreProps(client, appFeature); // Vdir Scope JObject vdir = VirtualDirectories.CreateVdir(client, "test_vdir", @"c:\sites\test_site\test_vdir", site); JObject vdirFeature = GetCompressionFeature(client, site.Value <string>("name"), vdir.Value <string>("path")); Assert.NotNull(vdirFeature); ChangeAndRestoreProps(client, vdirFeature); // Directory Scope JObject directoryFeature = GetCompressionFeature(client, site.Value <string>("name"), "/test_directory"); Assert.NotNull(directoryFeature); ChangeAndRestoreProps(client, directoryFeature); Sites.DeleteSite(client, Utils.Self(site)); } }