Exemplo n.º 1
0
        public void ShouldLogModuleInitializeErrorsAndContinueLoading()
        {
            IContainerExtension containerFacade = new MockContainerAdapter();
            var service       = new CustomModuleInitializerService(containerFacade);
            var invalidModule = CreateModuleInfo(typeof(InvalidModule));

            Assert.False(service.HandleModuleInitializerrorCalled);
            service.Initialize(invalidModule);
            Assert.True(service.HandleModuleInitializerrorCalled);
        }
Exemplo n.º 2
0
        public void ShouldLogModuleInitializeErrorsAndContinueLoading()
        {
            IServiceLocator containerFacade = new MockContainerAdapter();
            var             logger          = new MockLogger();
            var             service         = new CustomModuleInitializerService(containerFacade, logger);
            var             invalidModule   = CreateModuleInfo(typeof(InvalidModule));

            Assert.IsFalse(service.HandleModuleInitializerrorCalled);
            service.Initialize(invalidModule);
            Assert.IsTrue(service.HandleModuleInitializerrorCalled);
        }
Exemplo n.º 3
0
        public void ShouldLogModuleInitializeErrorsAndContinueLoading()
        {
            IServiceLocator containerFacade = new MockContainerAdapter();
            var logger = new MockLogger();
            var service = new CustomModuleInitializerService(containerFacade, logger);
            var invalidModule = CreateModuleInfo(typeof(InvalidModule));

            Assert.IsFalse(service.HandleModuleInitializerrorCalled);
            service.Initialize(invalidModule);
            Assert.IsTrue(service.HandleModuleInitializerrorCalled);
        }
Exemplo n.º 4
0
        public void ShouldLogModuleInitializeErrorsAndContinueLoading()
        {
            IContainerFacade containerFacade = new MockContainerAdapter();
            var logger        = new MockLogger();
            var service       = new CustomModuleInitializerService(containerFacade, logger);
            var invalidModule = new ModuleInfo(typeof(InvalidModule).Assembly.Location, typeof(InvalidModule).FullName, "InvalidModule");

            Assert.IsFalse(service.HandleModuleLoadErrorCalled);
            service.Initialize(new[] { invalidModule });
            Assert.IsTrue(service.HandleModuleLoadErrorCalled);
        }
        public void ShouldLogModuleInitializeErrorsAndContinueLoading()
        {
            IContainerFacade containerFacade = new MockContainerAdapter();
            var logger = new MockLogger();
            var service = new CustomModuleInitializerService(containerFacade, logger);
            var invalidModule = new ModuleInfo(typeof(InvalidModule).Assembly.Location, typeof(InvalidModule).FullName, "InvalidModule");

            Assert.IsFalse(service.HandleModuleLoadErrorCalled);
            service.Initialize(new[] { invalidModule });
            Assert.IsTrue(service.HandleModuleLoadErrorCalled);
        }