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 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 getPosTest() { ActionHandler target = new ActionHandler(); int ID = 5; Vector2 expected = new Vector2(100, 200); Vector2 actual; actual = target.getPos(ID); Assert.AreEqual(expected, actual); }