CreateOnetimeConsoleRunner() 공개 메소드

public CreateOnetimeConsoleRunner ( StatLightConfiguration statLightConfiguration ) : IRunner
statLightConfiguration StatLight.Core.Configuration.StatLightConfiguration
리턴 IRunner
        private static IRunner CreateStatLightRunner(StatLightConfiguration config, ILogger logger, EventAggregator eventAggregator)
        {
            var runnerFactory = new StatLightRunnerFactory(logger, eventAggregator, eventAggregator);

            return runnerFactory.CreateOnetimeConsoleRunner(config);
        }
예제 #2
0
        protected override void Before_all_tests()
        {
            base.Before_all_tests();

            System.Diagnostics.Debug.Assert(ClientTestRunConfiguration != null);

            var options = new InputOptions()
                .SetUnitTestProviderType(ClientTestRunConfiguration.UnitTestProviderType)
                .SetXapPaths(new[] { GetTestXapPathInternal()})
                .SetMicrosoftTestingFrameworkVersion(MSTestVersion)
                .SetMethodsToTest(ClientTestRunConfiguration.MethodsToTest)
                .SetTagFilters(ClientTestRunConfiguration.TagFilter)
            ;

            _ioc = BootStrapper.Initialize(options, _testLogger);

            _eventSubscriptionManager = _ioc.Resolve<EventAggregator>();
            _statLightRunnerFactory = new StatLightRunnerFactory(_testLogger, _ioc);

            var currentStatLightConfiguration = _ioc.Resolve<ICurrentStatLightConfiguration>();
            StatLightConfiguration statLightConfiguration = currentStatLightConfiguration.Current;
            _testLogger.Debug("Setting up xaphost {0}".FormatWith(statLightConfiguration.Server.XapHostType));

            Runner = _statLightRunnerFactory.CreateOnetimeConsoleRunner(statLightConfiguration);
        }