public void MustThrowDuplicateModuleExceptionIfTheModuleIsRegisteredInMoreThanOnceCatalog() { var catalog = new CompositeModuleCatalog(); var firstCatalog = new ModuleCatalog(); firstCatalog.AddModule(new ModuleInfo("ModuleA", typeof(ModuleA).FullName)); catalog.Add(firstCatalog); var secondCatalog = new ModuleCatalog(); secondCatalog.AddModule(new ModuleInfo("ModuleA", typeof(ModuleA).FullName)); catalog.Add(secondCatalog); ExceptionTester.CallMethodAndExpectException <DuplicateModuleException>(() => catalog.Initialize()); }
public void MustThrowDuplicateModuleExceptionIfTheModuleIsRegisteredInMoreThanOnceCatalog() { var catalog = new CompositeModuleCatalog(); var firstCatalog = new ModuleCatalog(); firstCatalog.AddModule(new ModuleInfo("ModuleA", typeof(ModuleA).FullName)); catalog.Add(firstCatalog); var secondCatalog = new ModuleCatalog(); secondCatalog.AddModule(new ModuleInfo("ModuleA", typeof(ModuleA).FullName)); catalog.Add(secondCatalog); ExceptionTester.CallMethodAndExpectException<DuplicateModuleException>(() => catalog.Initialize()); }