Exemple #1
0
 public void VectorTest()
 {
     Velocity target = new Velocity(); // TODO: Initialize to an appropriate value
     Vector2 actual;
     actual = target.Vector;
     Assert.AreEqual<Vector2>(Vector2.Zero, actual);
 }
Exemple #2
0
 public void VectorTest1()
 {
     Velocity target = new Velocity(float.MaxValue, -34242); // TODO: Initialize to an appropriate value
     Vector2 actual;
     Vector2 targetVector = new Vector2(target.XVelocity.Value, target.YVelocity.Value);
     actual = target.Vector;
     Assert.AreEqual<Vector2>(targetVector, actual);
 }
Exemple #3
0
 public void VelocityConstructorTestSomeNull()
 {
     float YSpeed = 5F;
     Velocity target = new Velocity();
     target.YVelocity = YSpeed;
     Assert.IsNull(target.XVelocity);
     Assert.Equals(target.YVelocity, YSpeed);
 }
Exemple #4
0
 public void VelocityConstructorTestNoNull()
 {
     float XSpeed = 2423.53489F;
     float YSpeed = -35.48F;
     Velocity target = new Velocity(XSpeed, YSpeed);
     Assert.Equals(target.XVelocity, XSpeed);
     Assert.Equals(target.YVelocity, YSpeed);
 }
Exemple #5
0
 public void VelocityConstructorTestAllNull()
 {
     Velocity target = new Velocity();
     Assert.IsNull(target.XVelocity);
     Assert.IsNull(target.YVelocity);
 }
 public SpriteBuilder SetVelocity(Velocity v)
 {
     if (v.XVelocity.HasValue)
     {
         _constructing.XSpeed = v.XVelocity.Value;
     }
     if (v.YVelocity.HasValue)
     {
         _constructing.YSpeed = v.YVelocity.Value;
     }
     return this;
 }