private (Command <TestContext>, ParsedCommand) MatchCommand(string commandText) { var parsedCommand = _parser.ParseContext(new TestContext { Message = commandText }, 1); var modules = GetModules(); return(_matcher.MatchCommand(modules, parsedCommand), parsedCommand); }
private void ParserShouldCorrectlyParseCorrectStrings(string data) { var context = new TestContext { Message = data }; var parserResult = _parser.ParseContext(context, 1); var currArg = parserResult.FullArgsStart; Assert.Equal(typeof(string), currArg.ArgType); currArg = currArg.Next; Assert.Equal(typeof(int), currArg.ArgType); currArg = currArg.Next; Assert.Equal(typeof(bool), currArg.ArgType); currArg = currArg.Next; Assert.Equal(typeof(double), currArg.ArgType); currArg = currArg.Next; Assert.Equal(typeof(string), currArg.ArgType); }