public void EqualsShouldReturnCorrectValue() { var target = new Number( 1m ); Assert.False( target.Equals( new Number( 10m ) ) ); Assert.True( target.Equals( new Number( 1m ) ) ); }
public void ObjectEqualsShouldReturnCorrectValue() { var target = new Number( 1m ); Assert.False( target.Equals( null ) ); Assert.False( target.Equals( new object() ) ); Assert.False( target.Equals( (object) new Number( 10m ) ) ); Assert.True( target.Equals( (object) new Number( 1m ) ) ); }