Namespace: Breakout.Tests
Assembly: Breakout.Tests (in Breakout.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: Breakout.Tests (in Breakout.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test, CloseAfterFirstFrame] public void FireBall() { Resolve<BallInLevel>(); var ball = Resolve<Ball>(); Assert.IsTrue(ball.IsVisible); AdvanceTimeAndUpdateEntities(0.01f); var initialBallPosition = new Vector2D(0.5f, 0.86f); Assert.AreEqual(initialBallPosition, ball.Position); if (!IsMockResolver) return; //ncrunch: no coverage Resolve<MockKeyboard>().SetKeyboardState(Key.Space, State.Pressing); AdvanceTimeAndUpdateEntities(); Assert.AreNotEqual(initialBallPosition, ball.Position); }
See Also