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); }
public void TestCollide() { myPellet.Collision += myGameState.Score.incrementScore; myPellet.Collide(); Assert.AreEqual(10, myGameState.Score.Score); }