Example #1
0
        public void UTNeg_hit()
        {
            Dispatch_mess RO = new Dispatch_mess();

            UTDraw(RO);
            Point p        = new Point(20, 20);
            bool  actual   = RO.Hit_testing(p);
            bool  expected = false;

            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void UTPos_hit()
        {
            Dispatch_mess RO = new Dispatch_mess();

            UTDraw(RO);
            Point p        = new Point(5, 3);
            bool  actual   = RO.Hit_testing(p);
            bool  expected = true;

            Assert.AreEqual(expected, actual);
        }
Example #3
0
        public void UTShift_Hit_pos()
        {
            Dispatch_mess RO = new Dispatch_mess();

            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);
        }
Example #4
0
        public void UTShift()
        {
            Dispatch_mess RO = new Dispatch_mess();

            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);
            }
        }
Example #5
0
 public void UTDraw(Dispatch_mess RO)
 {
     //RO.LeftTop = new Point(7, 8);
     //RO.RightBottom = new Point(5, 2);
     //Graphics gr = new Graphics();
 }