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));
        }
예제 #4
0
    public void TestEqualsWithNullReference() {
      UniRectangle testRectangle = new UniRectangle(
        firstTestScalar, secondTestScalar, thirdTestScalar, fourthTestScalar
      );

      Assert.IsFalse(testRectangle.Equals(null));
    }
예제 #5
0
    public void TestEqualsWithDifferentType() {
      UniRectangle testRectangle = new UniRectangle(
        firstTestScalar, secondTestScalar, thirdTestScalar, fourthTestScalar
      );

      Assert.IsFalse(testRectangle.Equals(DateTime.MinValue));
    }
예제 #6
0
    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));
    }