public void FindSpriteTest() { ActionHandler_Accessor target = new ActionHandler_Accessor(); // TODO: Initialize to an appropriate value int ID = 0; // TODO: Initialize to an appropriate value int expected = 0; // TODO: Initialize to an appropriate value int actual; actual = target.FindSprite(ID); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void CollisionDetectTest() { ActionHandler_Accessor target = new ActionHandler_Accessor(); //Object Assignment //Add objects to Position, Height, Width List target.addObject(new Vector2(100,210), 0, 30, 30); target.addObject(new Vector2(200, 200), 101, 90, 90); target.addObject(new Vector2(0, 0), 102, 90, 90); target.addObject(new Vector2(500, 100), 103, 90, 90); target.addObject(new Vector2(600, 250), 201, 35, 35); int n = 0; // Character int m = 1; // Object1 Vector2 expected = new Vector2(0,0); //No Collision Vector2 actual; actual = target.CollisionDetect(n, m); Assert.AreEqual(expected, actual); //True }
public void CollisionDetectTest1() { ActionHandler_Accessor target = new ActionHandler_Accessor(); //Object Assignment //Character Position is Changed target.addObject(new Vector2(190, 210), 0, 30, 30); target.addObject(new Vector2(200, 200), 101, 90, 90); target.addObject(new Vector2(0, 0), 102, 90, 90); target.addObject(new Vector2(500, 100), 103, 90, 90); target.addObject(new Vector2(600, 250), 201, 35, 35); int n = 0; // Character int m = 1; // Object1 Vector2 expected = new Vector2(0, 0); //No Collision Vector2 actual; actual = target.CollisionDetect(n, m); Assert.AreNotEqual(expected, actual); //NotEqual is True }