Пример #1
0
        public void HoldingTabTogglesScoreViewOn()
        {
            var scoreView = new ScoreOverlayView(null, Microsoft.Xna.Framework.Rectangle.Empty, null);
            var stubKeyboard = MockRepository.GenerateStub<IKeyboard>();
            HudController controller = new HudController(scoreView, stubKeyboard);
            stubKeyboard.Stub(x => x.IsKeyDown(Keys.Tab)).Return(true);

            controller.Process(1);

            Assert.IsTrue(scoreView.Visible);
        }
Пример #2
0
 public HudController(ScoreOverlayView scoreView, IKeyboard keyboard)
 {
     _scoreView = scoreView;
     _keyboard = keyboard;
 }