public void ModuleNeedsRetrievalReturnsTrueWhenModulesAreNotImported() { TestableMefModuleManager moduleManager = new TestableMefModuleManager(); bool result = moduleManager.CallModuleNeedsRetrieval(new ModuleInfo("name", "type")); Assert.IsTrue(result); }
public void ModuleNeedsRetrievalReturnsFalseWhenModuleIsFound() { TestableMefModuleManager moduleManager = new TestableMefModuleManager { Modules = new List<Lazy<IModule, IModuleExport>>() { new Lazy<IModule, IModuleExport>(() => new TestModule(), new TestModuleMetadata()) } }; bool result = moduleManager.CallModuleNeedsRetrieval(new ModuleInfo("TestModule", "Microsoft.Practices.Prism.MefExtensions.Tests.MefModuleManagerFixture.TestModule")); Assert.IsFalse(result); }
public void ModuleNeedsRetrievalReturnsTrueWhenModuleNotFound() { TestableMefModuleManager moduleManager = new TestableMefModuleManager { Modules = new List<Lazy<IModule, IModuleExport>>() { new Lazy<IModule, IModuleExport>(() => new TestModule(), new TestModuleMetadata()) } }; bool result = moduleManager.CallModuleNeedsRetrieval(new ModuleInfo("name", "type")); Assert.IsTrue(result); }
public void ModuleNeedsRetrievalReturnsTrueWhenNoModulesAreAvailable() { TestableMefModuleManager moduleManager = new TestableMefModuleManager { Modules = (IEnumerable<Lazy<IModule, IModuleExport>>) new List<Lazy<IModule, IModuleExport>>() }; bool result = moduleManager.CallModuleNeedsRetrieval(new ModuleInfo("name", "type")); Assert.IsTrue(result); }
public void ModuleNeedsRetrievalReturnsTrueWhenNoModulesAreAvailable() { TestableMefModuleManager moduleManager = new TestableMefModuleManager { Modules = (IEnumerable <Lazy <IModule, IModuleExport> >) new List <Lazy <IModule, IModuleExport> >() }; bool result = moduleManager.CallModuleNeedsRetrieval(new ModuleInfo("name", "type")); Assert.IsTrue(result); }
public void ModuleNeedsRetrievalReturnsFalseWhenModuleIsFound() { TestableMefModuleManager moduleManager = new TestableMefModuleManager { Modules = new List <Lazy <IModule, IModuleExport> >() { new Lazy <IModule, IModuleExport>(() => new TestModule(), new TestModuleMetadata()) } }; bool result = moduleManager.CallModuleNeedsRetrieval(new ModuleInfo("TestModule", "Microsoft.Practices.Prism.MefExtensions.Tests.MefModuleManagerFixture.TestModule")); Assert.IsFalse(result); }
public void ModuleNeedsRetrievalReturnsTrueWhenModuleNotFound() { TestableMefModuleManager moduleManager = new TestableMefModuleManager { Modules = new List <Lazy <IModule, IModuleExport> >() { new Lazy <IModule, IModuleExport>(() => new TestModule(), new TestModuleMetadata()) } }; bool result = moduleManager.CallModuleNeedsRetrieval(new ModuleInfo("name", "type")); Assert.IsTrue(result); }