public void NullOrEmptyOrInvalidCommand__ReturnsEmptyCommandList(string stringCommands) { CommandParser commandParser = new CommandParser(stringCommands); IEnumerable <ICommand> commands = commandParser.BuildCommandsList().ToList(); Assert.IsEmpty(commands); }
public void CommandParser_ReturnsCorrectCommandList(string stringCommand, params Type[] expectedCommandTypes) { CommandParser commandParser = new CommandParser(stringCommand); IList <ICommand> commands = commandParser.BuildCommandsList().ToList(); IList <Type> commandTypes = commands.Select(c => c.GetType()).ToList(); CollectionAssert.AreEqual(commandTypes, expectedCommandTypes); }