예제 #1
0
        public void WhenATextCommandIsSentToTheCommandProcessor(string strCommand, Command expectedCommand)
        {
            CommandTextProcessor commandTextProcessor = new CommandTextProcessor();

            Command returnCommand = commandTextProcessor.CreateCommandFromText(strCommand);

            Assert.AreEqual(expectedCommand, returnCommand);
        }
예제 #2
0
        public void WhenTheCommandIsNullAnExceptionIsThrown()
        {
            CommandTextProcessor commandTextProcessor = new CommandTextProcessor();

            Assert.ThrowsException <ArgumentNullException>(() => commandTextProcessor.CreateCommandFromText(null));
        }