Esempio n. 1
0
        public void EqualsShouldReturnFalseForNonSizeObjectBeingCompared()
        {
            var size = new Size(10, 20);

            bool result = size.Equals(new Object());

            Assert.IsFalse(result);
        }
Esempio n. 2
0
        public void EqualsShouldReturnFalseForSizesWithDifferentHeightAndWidth(int width1, int height1, int width2, int height2)
        {
            var size1 = new Size(width1, height1);
            var size2 = new Size(width2, height2);

            bool result = size1.Equals(size2);

            Assert.IsFalse(result);
        }
Esempio n. 3
0
        public void EqualsShouldReturnTrueForSizesWithSameHeightAndWidth()
        {
            var size1 = new Size(10, 20);
            var size2 = new Size(10, 20);

            bool result = size1.Equals(size2);

            Assert.IsTrue(result);
        }