Esempio n. 1
0
 public void EqualsShouldReturnCorrectValue()
 {
     var target = new Number( 1m );
     Assert.False( target.Equals( new Number( 10m ) ) );
     Assert.True( target.Equals( new Number( 1m ) ) );
 }
Esempio n. 2
0
 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 ) ) );
 }