Re-enable xunit warning 2017 (dotnet/corefx#40467)

* Re-enable xunit warning 2017

Use specialized assertions for checking for elements in collections.

* Revert Re-enable xunit warning 2017, revert some test changes

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/2fc48e13e87a4e68576d7df7af420ac2874e929e
This commit is contained in:
madmir authored and Stephen Toub committed 2019-08-22 10:17:26 -04:00
1 parent 972ee8c936
commit 018e1b82e8
28 files changed
+79 -79

No files matched your search

@@ -183,7 +183,7 @@ namespace System.Security.AccessControl
.GetAuditRules(true, true, typeof(System.Security.Principal.NTAccount));
List<CustomAuditRule> existingRules = ruleCollection.Cast<CustomAuditRule>().ToList();
Assert.False(existingRules.Contains(customAuditRuleReadWrite));
Assert.DoesNotContain(customAuditRuleReadWrite, existingRules);
}
@@ -415,7 +415,7 @@ namespace System.Security.AccessControl
.GetAccessRules(true, true, typeof(System.Security.Principal.NTAccount));
List<CustomAccessRule> existingRules = ruleCollection.Cast<CustomAccessRule>().ToList();
Assert.False(existingRules.Contains(customAccessRuleReadWrite));
Assert.DoesNotContain(customAccessRuleReadWrite, existingRules);
}
[Fact]
@@ -475,8 +475,8 @@ namespace System.Security.AccessControl
List<CustomAccessRule> existingRules = ruleCollection.Cast<CustomAccessRule>().ToList();
Assert.False(existingRules.Contains(customAccessRuleReadWrite));
Assert.False(existingRules.Contains(customAccessRuleSynchronize));
Assert.DoesNotContain(customAccessRuleReadWrite, existingRules);
Assert.DoesNotContain(customAccessRuleSynchronize, existingRules);
}
[Fact]
@@ -521,8 +521,8 @@ namespace System.Security.AccessControl
.GetAccessRules(true, true, typeof(System.Security.Principal.NTAccount));
List<CustomAccessRule> existingRules = ruleCollection.Cast<CustomAccessRule>().ToList();
Assert.False(existingRules.Contains(customAccessRuleReadWrite));
Assert.False(existingRules.Contains(customAccessRuleSynchronize));
Assert.DoesNotContain(customAccessRuleReadWrite, existingRules);
Assert.DoesNotContain(customAccessRuleSynchronize, existingRules);
}