Exemplo n.º 1
0
        public void InitializeServices_WhenServiceLocatorIsNotSet_ThrowsException()
        {
            ServiceLocatorUnitTestHelper.SetThreadLocalServiceLocator(null);
            var root = new SimpleAggregateRoot();

            root.InitializeServices();
        }
Exemplo n.º 2
0
        protected override void OnTeardown()
        {
            base.OnTeardown();

            ServiceLocatorUnitTestHelper.SetThreadLocalServiceLocator(null);
            Container             = null;
            StructureMapContainer = null;
        }
Exemplo n.º 3
0
        protected override void OnSetup()
        {
            base.OnSetup();

            StructureMapContainer = new Container();
            Container             = new IoC.StructureMap.Container(StructureMapContainer);

            StructureMapContainer.Configure(c => c.For <IDomainEventService>().HybridHttpOrThreadLocalScoped().Use <DomainEventService> ());

            ServiceLocatorUnitTestHelper.SetThreadLocalServiceLocator(Container);
        }