Run() 공개 메소드

public Run ( IList commandLineArguments, System.Memory memory, ProgressReporter reporter ) : int
commandLineArguments IList
memory System.Memory
reporter ProgressReporter
리턴 int
예제 #1
0
        [Test] public void ParsingOfDryRunInputAndOutputFolderIsDoneCorrectly() {
            var runner = new FolderRunner();
            runner.Run(new[] { "-d", "-i", "overridden_in", "-o", "overridden_out" }, memory, new NullReporter());

            Assert.AreEqual(true, memory.GetItem<Settings>().DryRun);
            Assert.AreEqual("overridden_in", memory.GetItem<Settings>().InputFolder);
            Assert.AreEqual("overridden_out", memory.GetItem<Settings>().OutputFolder);
        }
예제 #2
0
        [Test] public void DryRunSuppressesSummaryReport() {
            memory.GetItem<Settings>().DryRun = true;

            var reporter = new CollectingReporter();

            var runner = new FolderRunner();
            runner.Run(new string[] {}, memory, reporter);

            Assert.AreEqual(string.Empty, reporter.Output);
        }