public void TestEqualsWithDowncast() { UniRectangle testRectangle = new UniRectangle( firstTestScalar, secondTestScalar, thirdTestScalar, fourthTestScalar ); UniRectangle equivalentRectangle = new UniRectangle( firstTestScalar, secondTestScalar, thirdTestScalar, fourthTestScalar ); UniRectangle differingRectangle = new UniRectangle( fourthTestScalar, thirdTestScalar, secondTestScalar, firstTestScalar ); Assert.IsTrue(testRectangle.Equals((object)equivalentRectangle)); Assert.IsFalse(testRectangle.Equals((object)differingRectangle)); }
public void TestEqualsWithNullReference() { UniRectangle testRectangle = new UniRectangle( firstTestScalar, secondTestScalar, thirdTestScalar, fourthTestScalar ); Assert.IsFalse(testRectangle.Equals(null)); }
public void TestEqualsWithDifferentType() { UniRectangle testRectangle = new UniRectangle( firstTestScalar, secondTestScalar, thirdTestScalar, fourthTestScalar ); Assert.IsFalse(testRectangle.Equals(DateTime.MinValue)); }