Пример #1
0
        public void ExitCommand()
        {
            using (var GraphicsDevice = Mock.CreateGraphicsDevice())
                using (var Runner = new TestEngine(StackGame.Empty, Mock.Wrap(GraphicsDevice), Mock.Input))
                {
                    bool ExitCalled = false;
                    Runner.OnExit += () => { ExitCalled = true; };

                    Runner.Console.Visible = true;
                    Runner.EnterText("exit");

                    Assert.IsTrue(ExitCalled);
                }
        }
Пример #2
0
        public void SetCommand()
        {
            var GameSettings = new GameSettings()
            {
                Culture = "de-DE"
            };

            using (var GraphicsDevice = Mock.CreateGraphicsDevice())
                using (var Runner = new TestEngine(StackGame.Empty, Mock.Wrap(GraphicsDevice), Mock.Input, GameSettings))
                {
                    EngineVariables.DebugPath = false;
                    Runner.Console.Visible    = true;
                    Runner.EnterText("set stack.debugpath = true");
                    Assert.IsTrue(EngineVariables.DebugPath);
                }
        }