Пример #1
0
            public void ShouldReturnFalseWhenObjectIsNotEqual()
            {
                var first  = new MagickGeometry(10, 5);
                var second = new MagickGeometry(5, 10);

                Assert.False(first.Equals((object)second));
            }
Пример #2
0
            public void ShouldReturnTrueWhenInstanceIsEqual()
            {
                var first  = new MagickGeometry(10, 5);
                var second = new MagickGeometry(10, 5);

                Assert.True(first.Equals(second));
            }
Пример #3
0
            public void ShouldReturnTrueWhenObjectIsEqual()
            {
                var first  = new MagickGeometry(10, 5);
                var second = new MagickGeometry(10, 5);

                Assert.True(first.Equals((object)second));
            }
Пример #4
0
            public void ShouldReturnFalseWhenInstanceIsNotEqual()
            {
                var first  = new MagickGeometry(10, 5);
                var second = new MagickGeometry(5, 10);

                Assert.IsFalse(first.Equals(second));
            }
Пример #5
0
        public void Test_IEquatable()
        {
            MagickGeometry first = new MagickGeometry(10, 5);

            Assert.IsFalse(first == null);
            Assert.IsFalse(first.Equals(null));
            Assert.IsTrue(first.Equals(first));
            Assert.IsTrue(first.Equals((object)first));

            MagickGeometry second = new MagickGeometry(10, 5);

            Assert.IsTrue(first == second);
            Assert.IsTrue(first.Equals(second));
            Assert.IsTrue(first.Equals((object)second));

            second = new MagickGeometry(5, 5);

            Assert.IsTrue(first != second);
            Assert.IsFalse(first.Equals(second));
        }
Пример #6
0
            public void ShouldReturnTrueWhenObjectIsTheSame()
            {
                var geometry = new MagickGeometry(10, 5);

                Assert.True(geometry.Equals((object)geometry));
            }
Пример #7
0
            public void ShouldReturnTrueWhenInstanceIsTheSame()
            {
                var geometry = new MagickGeometry(10, 5);

                Assert.True(geometry.Equals(geometry));
            }
Пример #8
0
            public void ShouldReturnFalseWhenInstanceIsNull()
            {
                var geometry = new MagickGeometry(10, 5);

                Assert.False(geometry.Equals(null));
            }
		public void Test_IEquatable()
		{
			MagickGeometry first = new MagickGeometry(10, 5);

			Assert.IsFalse(first == null);
			Assert.IsFalse(first.Equals(null));
			Assert.IsTrue(first.Equals(first));
			Assert.IsTrue(first.Equals((object)first));

			MagickGeometry second = new MagickGeometry(10, 5);

			Assert.IsTrue(first == second);
			Assert.IsTrue(first.Equals(second));
			Assert.IsTrue(first.Equals((object)second));

			second = new MagickGeometry(5, 5);

			Assert.IsTrue(first != second);
			Assert.IsFalse(first.Equals(second));
		}