Example #1
0
        public void InitializationExceptionsAreWrapped()
        {
            Assembly asm = CompilerHelper.CompileFileAndLoadAssembly("Microsoft.Practices.Composite.Tests.Mocks.Modules.MockModuleThrowingException.cs",
                                                                     @".\MocksModulesThwrowing\MockModuleThrowingException.dll");

            ModuleLoader loader = new ModuleLoader(new MockContainerAdapter(), new MockLogger());

            ModuleInfo info = new ModuleInfo(asm.CodeBase.Replace(@"file:///", ""),
                                             "Microsoft.Practices.Composite.Tests.Mocks.Modules.MockModuleThrowingException", "MockModuleThrowingException");

            loader.Initialize(new[] { info });
        }