getPos() public method

public getPos ( ) : Vector2
return Vector2
Example #1
0
 public void getPosTest()
 {
     Sprite target = new Sprite(); // TODO: Initialize to an appropriate value
     Vector2 expected = new Vector2(); // TODO: Initialize to an appropriate value
     Vector2 actual;
     actual = target.getPos();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Example #2
0
 public void updatePosTest_Spr()
 {
     Sprite target = new Sprite();
     Vector2 newPos = new Vector2(120, 350);
     Vector2 lastPos = target.getPos();
     target.updatePos(newPos);
     Assert.IsFalse(lastPos == target.getPos());
 }
Example #3
0
 public void UpdateTest_Spr()
 {
     Sprite target = new Sprite();
     TimeSpan span = new TimeSpan(0,0,0,0,100); //100 milisecond
     GameTime theGameTime = new GameTime(span, span);
     Vector2 theSpeed = new Vector2(160, 0);
     Vector2 theDirection = new Vector2(-1, 0);
     Vector2 lastPos = target.getPos();
     target.Update(theGameTime, theSpeed, theDirection);
     Assert.IsFalse(lastPos == target.getPos());
 }
Example #4
0
 public void SpriteConstructorTest1()
 {
     Vector2 test = new Vector2(0,0);
     Sprite target = new Sprite();
     Assert.IsTrue(target.getPos() == test, "pos is not 0,0");
     Assert.IsTrue(target.Scale == 1.0f, "Scale is not 1.0f");
 }