Exemple #1
0
        public void CollisionEventRaisedTest()
        {
            Boolean actual   = false;
            Boolean expected = true;
            Pellet  pellet   = new Pellet();

            pellet.CollisionEvent += (x) =>
            {
                x.Points += 100;
                actual    = true;
            };
            pellet.Collide();
            Assert.AreEqual(expected, actual);
        }
Exemple #2
0
 public void TestCollide()
 {
     myPellet.Collision += myGameState.Score.incrementScore;
     myPellet.Collide();
     Assert.AreEqual(10, myGameState.Score.Score);
 }