public void HasDuplicateMetadataElementsCaseSensitive() { // Arrange var nuspec = Resources.LoadXml(Resources.Nuspecs.DuplicateMetadataElements); // Act var output = NuspecUtility.GetDuplicateMetadataElements(nuspec, caseSensitive: true); // Assert Assert.NotEmpty(output); Assert.Equal(new[] { "authors", "dependencies", "owners" }, output.Keys.OrderBy(x => x)); Assert.Equal(3, output["authors"]); Assert.Equal(2, output["dependencies"]); Assert.Equal(2, output["owners"]); }
public bool IsMatch(XDocument nuspec) { return(NuspecUtility .GetDuplicateMetadataElements(nuspec, caseSensitive: true) .Any()); }