public void Should_perform_full_bootstrap()
        {
            var container = new DIContainer();

            container.Configure();
            container.InitializeCache(getWatchDirectory());
            var cache = container.Services.Locate <ICache>();

            cache.Count.ShouldEqual(4);
        }
        public void Should_register_run_failed_first_pre_processor()
        {
            var container = new DIContainer();

            container.Configure();
            container.AddRunFailedTestsFirstPreProcessor();
            var preProcessors = container.Services.LocateAll <IPreProcessTestruns>();

            preProcessors.Length.ShouldEqual(2);
        }
Example #3
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            using (var diContainer = new DIContainer())
            {
                diContainer.Configure();
                diContainer.ConfigureWindows();

                var wl = new WindowLocator(diContainer);

                wl.OpenWindow <Window_Main>();
            }
        }
        public void SetUp()
        {
            _container = new DIContainer();
            _container.Configure();
            _container.Container
            .Register(Component.For <IConsumerOf <StringMessage> >().ImplementedBy <Listener>())
            .Register(Component.For <IConsumerOf <StringMessage> >().Forward <IConsumerOf <IntMessage> >().ImplementedBy <BigListener>())
            .Register(Component.For <IOverridingConsumer <StringMessage> >().ImplementedBy <OverridingConsumer>().LifeStyle.Singleton);

            _bus                 = _container.Services.Locate <IMessageBus>();
            _threadException     = "";
            _bus.OnErrorMessage += new EventHandler <ErrorMessageEventArgs>(_bus_OnErrorMessage);
        }
 public void FixtureSetUp()
 {
     _container = new DIContainer();
     _container.Configure();
     _locator = _container.Services;
 }