diff --git a/test/Microsoft.AspNet.Mvc.TagHelpers.Test/TagHelperOutputExtensionsTest.cs b/test/Microsoft.AspNet.Mvc.TagHelpers.Test/TagHelperOutputExtensionsTest.cs index 351567ccad..8391af2793 100644 --- a/test/Microsoft.AspNet.Mvc.TagHelpers.Test/TagHelperOutputExtensionsTest.cs +++ b/test/Microsoft.AspNet.Mvc.TagHelpers.Test/TagHelperOutputExtensionsTest.cs @@ -607,15 +607,18 @@ namespace Microsoft.AspNet.Mvc.TagHelpers { } - public bool Equals( - IReadOnlyTagHelperAttribute attributeX, - IReadOnlyTagHelperAttribute attributeY) + public bool Equals(IReadOnlyTagHelperAttribute attributeX, IReadOnlyTagHelperAttribute attributeY) { - return - attributeX == attributeY || - // Normal comparer doesn't care about the Name case, in tests we do. + if (attributeX == attributeY) + { + return true; + } + + // Normal comparer (TagHelperAttribute.Equals()) doesn't care about the Name case, in tests we do. + return attributeX != null && string.Equals(attributeX.Name, attributeY.Name, StringComparison.Ordinal) && - Equals(attributeX.Value, attributeY.Value); + attributeX.Minimized == attributeY.Minimized && + (attributeX.Minimized || Equals(attributeX.Value, attributeY.Value)); } public int GetHashCode(IReadOnlyTagHelperAttribute attribute)