public void UTShift_Hit_pos() { Lost_message RO = new Lost_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); }
public void UTShift() { Lost_message RO = new Lost_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); } }