public void EqualsShouldMatchHashCode() { // arrange var target = new DynamicComparer<string>( s => s.GetHashCode() ); // act var actual = target.Equals( "test", "test" ); // assert Assert.True( actual ); }
public void IEqualityComparerEqualsShouldReturnTrueWhenEqual() { // arrange IEqualityComparer target = new DynamicComparer<string>( ( s1, s2 ) => s1.CompareTo( s2 ) ); // act var actual = target.Equals( "test", "test" ); // assert Assert.True( actual ); }
public void EqualsShouldMatchComparison() { // arrange var target = new DynamicComparer<string>( ( s1, s2 ) => s1.CompareTo( s2 ) ); // act var actual = target.Equals( "test", "test" ); // assert Assert.True( actual ); }