Beispiel #1
0
 int Run(Memory memory, IList<string> arguments) {
     ParseArguments(memory, arguments);
     var fileSystem = new FileSystemModel(memory.GetItem<Settings>().CodePageNumber);
     memory.GetItem<Context>().PageSource = fileSystem;
     memory.GetItem<Context>().SuitePath = new DirectoryPath(memory.GetItem<Settings>().InputFolder);
     myRunner = new SuiteRunner(memory, myProgressReporter);
     myRunner.Run(
         CreateStoryTestFolder(memory, fileSystem),
         selectedFile);
     return myRunner.TestCounts.FailCount;
 }
 public void ExecutesSuiteTearDownLast()
 {
     var folders = new FolderTestModel();
     folders.MakeFile("in\\suiteteardown.html", "<table><tr><td>fixture</td></tr></table>");
     folders.MakeFile("in\\zzzz.html", "<table><tr><td>fixture</td></tr></table>");
     var config = new Configuration();
     config.GetItem<Settings>().InputFolder = "in";
     config.GetItem<Settings>().OutputFolder = "out";
     var runner = new SuiteRunner(config, new NullReporter());
     runner.Run(new StoryTestFolder(config, folders), string.Empty);
     int tearDown = folders.FileContent("out\\reportIndex.html").IndexOf("suiteteardown.html");
     int otherFile = folders.FileContent("out\\reportIndex.html").IndexOf("zzzz.html");
     Assert.IsTrue(otherFile < tearDown);
 }
Beispiel #3
0
        [Test] public void ExecutesSuiteTearDownLast()
        {
            var folders = new FolderTestModel();

            folders.MakeFile("in\\suiteteardown.html", "<table><tr><td>fixture</td></tr></table>");
            folders.MakeFile("in\\zzzz.html", "<table><tr><td>fixture</td></tr></table>");
            var config = new Configuration();

            config.GetItem <Settings>().InputFolder  = "in";
            config.GetItem <Settings>().OutputFolder = "out";
            var runner = new SuiteRunner(config, new NullReporter());

            runner.Run(new StoryTestFolder(config, folders), string.Empty);
            int tearDown  = folders.FileContent("out\\reportIndex.html").IndexOf("suiteteardown.html");
            int otherFile = folders.FileContent("out\\reportIndex.html").IndexOf("zzzz.html");

            Assert.IsTrue(otherFile < tearDown);
        }
Beispiel #4
0
 private void RunSuite(ProgressReporter reporter) {
     var runner = new SuiteRunner(memory, reporter);
     runner.Run(new StoryTestFolder(memory, folders), string.Empty);
 }
 int Run(Memory memory, IList<string> arguments)
 {
     ParseArguments(memory, arguments);
     myRunner = new SuiteRunner(memory, myProgressReporter);
     myRunner.Run(
         CreateStoryTestFolder(memory),
         selectedFile);
     return myRunner.TestCounts.FailCount;
 }
Beispiel #6
0
 private int Run(Configuration configuration, ICollection<string> theArguments)
 {
     ParseArguments(configuration, theArguments);
     myRunner = new SuiteRunner(configuration, myProgressReporter);
     myRunner.Run(
         new StoryTestFolder(configuration, new FileSystemModel(configuration.GetItem<Settings>().CodePageNumber)),
         string.Empty);
     return myRunner.TestCounts.FailCount;
 }
Beispiel #7
0
        private void RunSuite(ProgressReporter reporter)
        {
            var runner = new SuiteRunner(memory, reporter);

            runner.Run(new StoryTestFolder(memory, folders), string.Empty);
        }
Beispiel #8
0
        private void RunSuite(ProgressReporter reporter, string selectedFile = "")
        {
            var runner = new SuiteRunner(memory, reporter, m => new CellProcessorBase(m, m.GetItem <CellOperators>()), folders);

            runner.Run(new StoryTestFolder(memory, folders, new Filters(string.Empty, new FileExclusions(), selectedFile)), selectedFile);
        }
Beispiel #9
0
 int Run(Configuration configuration, IList<string> arguments)
 {
     ParseArguments(configuration, arguments);
     myRunner = new SuiteRunner(configuration, myProgressReporter);
     myRunner.Run(
         CreateStoryTestFolder(configuration),
         selectedFile);
     return myRunner.TestCounts.FailCount;
 }
Beispiel #10
0
        private void RunSuite(ProgressReporter reporter)
        {
            var runner = new SuiteRunner(memory, reporter, m => new CellProcessorBase(m, m.GetItem <CellOperators>()));

            runner.Run(new StoryTestFolder(memory, folders), string.Empty);
        }