Beispiel #1
0
        public void TestChangePosition()
        {
            MoveableGameObject ball       = new MoveableGameObject(298, 414, 20, 20, true, 20, 8.161641f, 8.161641f, true, System.Drawing.Brushes.Yellow);
            Rectangle          testRecOne = new Rectangle(100, 100, 20, 20);

            ball.ChangePosition(100, 100);
            Assert.AreEqual(ball.GetRecPosition(), testRecOne);
            ball.ChangePosition(200);
            Rectangle testRecTwo = new Rectangle(200, 100, 20, 20);

            Assert.AreEqual(ball.GetRecPosition(), testRecTwo);
        }
Beispiel #2
0
        public void TestPosition()
        {
            MoveableGameObject ball = new MoveableGameObject(298, 414, 20, 20, true, 20, 8.161641f, 8.161641f, true, System.Drawing.Brushes.Yellow);

            Rectangle rec     = ball.GetRecPosition();
            Rectangle testRec = new Rectangle(298, 414, 20, 20);

            Assert.AreEqual(rec, testRec);
        }