diff --git a/Src/Idioms/EqualityComparerEqualsTransitiveAssertion.cs b/Src/Idioms/EqualityComparerEqualsTransitiveAssertion.cs index 4a5b154ba..bdd5e6543 100644 --- a/Src/Idioms/EqualityComparerEqualsTransitiveAssertion.cs +++ b/Src/Idioms/EqualityComparerEqualsTransitiveAssertion.cs @@ -50,13 +50,13 @@ protected override void VerifyEquals(MethodInfo methodInfo, Type argumentType) var thirdTestSubject = this.Builder.CreateAnonymous(argumentType); - var firstResult = (bool)methodInfo.Invoke(comparer, new[] { firstTestSubject, secondTestSubject }); + var firstToSecond = (bool)methodInfo.Invoke(comparer, new[] { firstTestSubject, secondTestSubject }); - var secondResult = (bool)methodInfo.Invoke(comparer, new[] { secondTestSubject, thirdTestSubject }); + var secondToThird = (bool)methodInfo.Invoke(comparer, new[] { secondTestSubject, thirdTestSubject }); - var thirdResult = (bool)methodInfo.Invoke(comparer, new[] { firstTestSubject, thirdTestSubject }); + var firstToThird = (bool)methodInfo.Invoke(comparer, new[] { firstTestSubject, thirdTestSubject }); - if (firstResult != secondResult || firstResult != thirdResult) + if ((firstToSecond && secondToThird) != firstToThird) { throw new EqualityComparerImplementationException(string.Format(CultureInfo.CurrentCulture, "The type '{0}' implements the `IEqualityComparer` interface incorrectly: " +