Exemplo n.º 1
0
        public void CommandInterpreterDecodeHelpInput()
        {
            Game game = new Game(new InitialState());

            game.Word = new Word();

            CommandInterpreter.AssignGameDelegate(() => game);

            var decoder = new CommandInterpreter();

            decoder.Decode("help");
        }
Exemplo n.º 2
0
        public void DecodeCommandTests()
        {
            Game game = new Game(new InitialState());

            game.Run();

            string testExampleWord   = "computer";
            string testDecodeCommand = "help";

            CommandInterpreter.Decode(testDecodeCommand);

            // CommandInterpreter decodeCommandWord = new CommandInterpreter(testDecodeCommand);

            // var decodeCommand = CommandInterpreter.AssignGameDelegate(GetGameDelegate);
            // Assert.IsNotNull(decodeCommandWord);

            Assert.AreEqual(game.Word, testExampleWord);
        }