@@ -32,10 +32,12 @@ public void ballConstructorTest()
3232 Vector2 testPosition = new Vector2 ( 2 , 4 ) ;
3333 Vector2 testVelocity = new Vector2 ( 3 , 6 ) ;
3434 int radius = 10 ;
35- Ball ball = new Ball ( radius , testPosition , testVelocity ) ;
35+ float mass = 5f ;
36+ Ball ball = new Ball ( radius , testPosition , testVelocity , mass ) ;
3637 Assert . AreEqual ( radius , ball . Radius ) ;
3738 Assert . AreEqual ( testPosition , ball . Position ) ;
3839 Assert . AreEqual ( testVelocity , ball . Velocity ) ;
40+ Assert . AreEqual ( mass , ball . Mass ) ;
3941 }
4042
4143 [ Test ]
@@ -44,7 +46,8 @@ public void changeVelocityTest()
4446 Vector2 testPosition = new Vector2 ( 2 , 4 ) ;
4547 Vector2 testVelocity = new Vector2 ( 3 , 6 ) ;
4648 int radius = 10 ;
47- Ball ball = new Ball ( radius , testPosition , testVelocity ) ;
49+ float mass = 5f ;
50+ Ball ball = new Ball ( radius , testPosition , testVelocity , mass ) ;
4851 ball . Velocity = new Vector2 ( 6 , 12 ) ;
4952 Assert . AreEqual ( 6 , ball . Velocity . X ) ;
5053 Assert . AreEqual ( 12 , ball . Velocity . Y ) ;
@@ -56,7 +59,8 @@ public void setPositionTest()
5659 Vector2 testPosition = new Vector2 ( _logicAPI . table . Width , _logicAPI . table . Height ) ;
5760 Vector2 testVelocity = new Vector2 ( 1 , 2 ) ;
5861 int radius = 10 ;
59- Ball ball = new Ball ( radius , testPosition , testVelocity ) ;
62+ float mass = 5f ;
63+ Ball ball = new Ball ( radius , testPosition , testVelocity , mass ) ;
6064 BallLogic ballLogic = new BallLogic ( ball ) ;
6165 ballLogic . setPosition ( ) ;
6266 Assert . AreNotEqual ( _logicAPI . table . Width , ball . Position . X ) ;
0 commit comments