This commit is contained in:
Baris Caglar 2018-11-19 17:22:50 -08:00 коммит произвёл Peter Hsu
Родитель 1887262434
Коммит 9d274672c3
4 изменённых файлов: 6 добавлений и 27 удалений

Просмотреть файл

@ -106,7 +106,7 @@ namespace Microsoft.IIS.Administration.Tests
Assert.True(DeleteFile(client, file));
}
file = CreateFile(client, feature, fileName);
file = CreateFileInternal(client, feature, fileName);
Assert.NotNull(file);
Assert.True(DeleteFile(client, file));
}
@ -141,7 +141,7 @@ namespace Microsoft.IIS.Administration.Tests
return docFeature.Value<JArray>("files");
}
public static JObject CreateFile(HttpClient client, JObject docFeature, string fileName)
public static JObject CreateFileInternal(HttpClient client, JObject docFeature, string fileName)
{
string featureUuid = docFeature.Value<string>("id");

Просмотреть файл

@ -133,7 +133,7 @@ namespace Microsoft.IIS.Administration.Tests
string result = null;
try {
ChangeAllFeatureProperties(feature);
ChangeAllFeaturePropertiesInternal(feature);
Assert.True(client.Patch(Utils.Self(feature), feature, out result));
JObject patchedFeature = JObject.Parse(result);
AssertFeaturesEqual(feature, patchedFeature);
@ -149,7 +149,7 @@ namespace Microsoft.IIS.Administration.Tests
}
}
private void ChangeAllFeatureProperties(JObject handlers)
private void ChangeAllFeaturePropertiesInternal(JObject handlers)
{
handlers[allowedAccessProperty]["read"] = !handlers[allowedAccessProperty].Value<bool>("read");
handlers[allowedAccessProperty]["write"] = !handlers[allowedAccessProperty].Value<bool>("write");

Просмотреть файл

@ -414,7 +414,7 @@ namespace Microsoft.IIS.Administration.Tests
var result = await responseMessage.Content.ReadAsStringAsync();
_snapshot = JObject.Parse(result);
}
catch (Exception e) {
catch {
ErrorCount++;
}
@ -466,7 +466,7 @@ namespace Microsoft.IIS.Administration.Tests
try {
await client.GetAsync(Uri);
}
catch (Exception e) {
catch {
}
await Task.Delay(20);

Просмотреть файл

@ -506,27 +506,6 @@ namespace Microsoft.IIS.Administration.Tests
return Globals.Success(response);
}
public static bool GetSites(HttpClient client, out List<JObject> sites)
{
string response = null;
sites = null;
if(!client.Get(SITE_URL, out response)) {
return false;
}
JObject jObj = JsonConvert.DeserializeObject<JObject>(response);
JArray sArr = jObj["websites"] as JArray;
sites = new List<JObject>();
foreach(JObject site in sArr) {
sites.Add(site);
}
return true;
}
public static JObject GetSite(HttpClient client, string name)
{
var site = client.Get(SITE_URL)["websites"]