internal ContinuousConsoleRunner(
            ILogger logger,
            IEventSubscriptionManager eventSubscriptionManager,
            IEventPublisher eventPublisher,
            string xapPath,
            ClientTestRunConfiguration clientTestRunConfiguration,
            IWebServer webServer,
            IWebBrowser webBrowser)
        {
            _xapPath   = xapPath;
            _webServer = webServer;
            _xapFileBuildChangedMonitor = new XapFileBuildChangedMonitor(eventPublisher, _xapPath);

            _continuousRunnerThread = new Thread(() =>
            {
                using (var runner = new ContinuousTestRunner(logger, eventSubscriptionManager, eventPublisher, webBrowser, clientTestRunConfiguration, _xapPath))
                {
                    string line;
                    while (!(line = System.Console.ReadLine()).Equals("exit", StringComparison.OrdinalIgnoreCase))
                    {
                        runner.ForceFilteredTest(line);
                    }
                }
            });
        }
Пример #2
0
        internal ContinuousConsoleRunner(
            ILogger logger,
            IEventSubscriptionManager eventSubscriptionManager,
            IEventPublisher eventPublisher,
            IWebServer webServer,
            IEnumerable <IWebBrowser> webBrowsers,
            IDialogMonitorRunner dialogMonitorRunner,
            ICurrentStatLightConfiguration currentStatLightConfiguration)
        {
            eventSubscriptionManager.AddListener(this);
            _logger = logger;
            _eventSubscriptionManager = eventSubscriptionManager;
            _eventPublisher           = eventPublisher;
            _webServer                     = webServer;
            _webBrowsers                   = webBrowsers;
            _dialogMonitorRunner           = dialogMonitorRunner;
            _currentStatLightConfiguration = currentStatLightConfiguration;
            Func <string, string> getFullXapPath = path => new FileInfo(path).FullName;
            var xapFiles = currentStatLightConfiguration.Select(x => getFullXapPath(x.Server.XapToTestPath));

            _statLightConfigurations    = currentStatLightConfiguration.ToDictionary(x => getFullXapPath(x.Server.XapToTestPath), x => x);
            _xapFileBuildChangedMonitor = new XapFileBuildChangedMonitor(eventPublisher, xapFiles);
            xapFiles.Each(e => _initialXaps.Add(new XapFileBuildChangedServerEvent(e)));
            _currentFilterString = currentStatLightConfiguration.First().Client.TagFilter;
            QueueInitialXaps();

            _runnerTask = new Thread(() =>
            {
                TryRun();

                while (!ShouldExitFromInput())
                {
                    TryRun();
                }
            });
        }
Пример #3
0
            protected override void Before_all_tests()
            {
                base.Before_all_tests();

                _xapWatcher = new XapFileBuildChangedMonitor(base.TestEventPublisher, PathToTempXapFile);
            }
Пример #4
0
 public void Should_be_able_to_initialize_the_XapWatcher_by_specifying_the_xap_path()
 {
     var xapWatcher = new XapFileBuildChangedMonitor(base.TestEventPublisher, PathToTempXapFile);
 }
Пример #5
0
            protected override void Before_all_tests()
            {
                base.Before_all_tests();

                _xapWatcher = new XapFileBuildChangedMonitor(base.TestEventPublisher, PathToTempXapFile);
            }
Пример #6
0
 public void Should_be_able_to_initialize_the_XapWatcher_by_specifying_the_xap_path()
 {
     var xapWatcher = new XapFileBuildChangedMonitor(base.TestEventPublisher, PathToTempXapFile);
 }