public void CollisionCheckTest() { ActionHandler target = new ActionHandler(); // TODO: Initialize to an appropriate value int ID = 0; // TODO: Initialize to an appropriate value Vector2 expected = new Vector2(0,0); // TODO: Initialize to an appropriate value Vector2 actual; actual = target.CollisionCheck(ID); Assert.AreEqual(expected, actual); }
public void addObjectTest() { ActionHandler target = new ActionHandler(); Vector2 Pos = new Vector2(300, 200); int ID = 208; float Height = 30F; float Width = 30F; target.addObject(Pos, ID, Height, Width); Assert.IsTrue(target.getPos(ID) == Pos, "Position fail"); Assert.IsTrue(target.getWidth(ID) == Width, "Width fail"); Assert.IsTrue(target.getHeight(ID) == Height, "Height fail "); }
public void ActionHandlerConstructorTest() { ActionHandler target = new ActionHandler(); Assert.IsNotNull(target); }
public void UpdatePosTest1() { ActionHandler target = new ActionHandler(); Sprite name = new Sprite(); name.SpriteID = 15; name.updatePos(new Vector2(100, 299)); target.UpdatePos(name); Assert.IsTrue(name.pos == target.getPos(name.SpriteID)); }
public void VisibilityTest1() { ActionHandler target = new ActionHandler(); //Object Assignment target.addObject(new Vector2(300, 250), 0, 30, 30); target.addObject(new Vector2(100, 100), 101, 90, 90); target.addObject(new Vector2(0, 0), 102, 90, 90); target.addObject(new Vector2(400, 240), 103, 90, 90); //Enemy Position is changed target.addObject(new Vector2(600, 250), 201, 35, 35); int ID1 = 201; //Enemy int ID2 = 0; //Character //Vector2(-999, -999) is returned when enemy didn't find Vector2 expected = new Vector2(-999, -999); Vector2 actual; actual = target.Visibility(ID1, ID2); Assert.AreEqual(expected, actual); //true }
public void RecognizeObjectTest() { ActionHandler target = new ActionHandler(); // TODO: Initialize to an appropriate value Sprite name = null; // TODO: Initialize to an appropriate value target.RecognizeObject(name); Assert.Inconclusive("A method that does not return a value cannot be verified."); }
public void IgnoreObjectTest() { ActionHandler target = new ActionHandler(); // TODO: Initialize to an appropriate value Sprite name = new Sprite(); // TODO: Initialize to an appropriate value target.IgnoreObject(name); }
public void getWidthTest() { ActionHandler target = new ActionHandler(); int ID = 0; double expected = 45F; double actual; actual = target.getWidth(ID); Assert.AreEqual(expected, actual); }
public void getPosTest() { ActionHandler target = new ActionHandler(); int ID = 5; Vector2 expected = new Vector2(100, 200); Vector2 actual; actual = target.getPos(ID); Assert.AreEqual(expected, actual); }
public void getHeightTest() { ActionHandler target = new ActionHandler(); int ID = 12; double expected = 30F; double actual; actual = target.getHeight(ID); Assert.AreEqual(expected, actual); }