Exemplo n.º 1
0
        public void UTShift_Hit_pos()
        {
            Found_message RO = new Found_message();

            UTDraw(RO);
            Point p = new Point(10, 10);

            RO.Shift(p);
            Point p1       = new Point(11, 11);
            bool  actual   = RO.Hit_testing(p1);
            bool  expected = true;

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void UTShift()
        {
            Found_message RO = new Found_message();

            UTDraw(RO);
            Point p  = new Point(10, 10);
            Point p1 = new Point(5, 8);

            RO.Hit_testing(p);
            RO.Shift(p1);
            if (p1.Equals(RO.LeftTop))
            {
                Assert.AreEqual(p1, RO.LeftTop);
            }
            else
            {
                Assert.AreEqual(p1, RO.RightBottom);
            }
        }