Esempio n. 1
0
        private void TestShowItemCore(IRunnerRepository inRepo, params string[] inExpected)
        {
            var it = inExpected.GetEnumerator();

            var runner = inRepo.FindRunner(new ShowItemParseResult(), (message) => {
                Assert.That(it.MoveNext(), Is.True);
                Assert.That(message, Is.EqualTo(it.Current));
            });

            runner();

            Assert.That(it.MoveNext(), Is.False);
        }
Esempio n. 2
0
        private bool ProcessCommand()
        {
            var command = ReadCommand();

            if (command == TerminateCommand)
            {
                return(false);
            }

            var parser      = mParserRepo.FindParser(command);
            var parseResult = parser();

            var runner = mRunnerRepo.FindRunner(parseResult, this.LogUpdated);

            runner();

            return(true);
        }
Esempio n. 3
0
        private void TestShowItemCore(IRunnerRepository inRepo, params string[] inExpected)
        {
            var it = inExpected.GetEnumerator();

            var runner = inRepo.FindRunner(new ShowItemParseResult(), (message) => {
                Assert.That(it.MoveNext(), Is.True);
                Assert.That(message, Is.EqualTo(it.Current));
            });
            runner();

            Assert.That(it.MoveNext(), Is.False);
        }