Example #1
0
        public void EqualsTest()
        {
            var           chD  = new CheckerOnDesk(ColorType.White, CheckerStatus.Simple, new Point(1, 1));
            var           chD2 = new CheckerOnDesk(ColorType.White, CheckerStatus.Simple, new Point(1, 1));
            var           chD3 = new CheckerOnDesk(ColorType.Black, CheckerStatus.Simple, new Point(1, 1));
            CheckerOnDesk chD4 = null;
            object        chD5 = null;
            object        chD6 = new CheckerOnDesk(ColorType.Black, CheckerStatus.Simple, new Point(1, 1));

            Assert.IsTrue(!chD.Equals(chD4));
            Assert.IsTrue(!chD.Equals(chD5));
            Assert.IsTrue(chD.Equals(chD2));
            Assert.IsTrue(!chD.Equals(chD3));
            Assert.IsTrue(!chD.Equals(chD6));
        }
Example #2
0
        public void EqualsTest_WrongParam()
        {
            var chD = new CheckerOnDesk(ColorType.White, CheckerStatus.Simple, new Point(1, 1));

            Assert.IsTrue(!chD.Equals(5));
        }