public void UTNeg_hit() { Return_mess RO = new Return_mess(); UTDraw(RO); Point p = new Point(20, 20); bool actual = RO.Hit_testing(p); bool expected = false; Assert.AreEqual(expected, actual); }
public void UTPos_hit() { Return_mess RO = new Return_mess(); UTDraw(RO); Point p = new Point(5, 3); bool actual = RO.Hit_testing(p); bool expected = true; Assert.AreEqual(expected, actual); }
public void UTShift_Hit_pos() { Return_mess RO = new Return_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); }
public void UTShift() { Return_mess RO = new Return_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); } }
public void UTDraw(Return_mess RO) { ////RO.LeftTop = new Point(7, 8); ////RO.RightBottom = new Point(5, 2); //Graphics gr = new Graphics(); }