本文整理汇总了C#中Microsoft.Practices.Prism.MefExtensions.Tests.DefaultMefBootstrapper类的典型用法代码示例。如果您正苦于以下问题:C# DefaultMefBootstrapper类的具体用法?C# DefaultMefBootstrapper怎么用?C# DefaultMefBootstrapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DefaultMefBootstrapper类属于Microsoft.Practices.Prism.MefExtensions.Tests命名空间,在下文中一共展示了DefaultMefBootstrapper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: RunShouldCallCreateLogger
public void RunShouldCallCreateLogger()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
Assert.IsTrue(bootstrapper.CreateLoggerCalled);
}
开发者ID:xperiandri,项目名称:PortablePrism,代码行数:7,代码来源:MefBootstrapperRunMethodFixture.cs
示例2: RunConfiguresServiceLocatorProvider
public void RunConfiguresServiceLocatorProvider()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
Assert.IsTrue(ServiceLocation.ServiceLocator.Current is MefServiceLocatorAdapter);
}
开发者ID:xperiandri,项目名称:PortablePrism,代码行数:7,代码来源:MefBootstrapperRunMethodFixture.cs
示例3: ContainerDefaultsToNull
public void ContainerDefaultsToNull()
{
var bootstrapper = new DefaultMefBootstrapper();
var container = bootstrapper.BaseContainer;
Assert.IsNull(container);
}
开发者ID:CarlosVV,项目名称:mediavf,代码行数:7,代码来源:MefBootstrapperFixture.cs
示例4: RunShouldCallCreateModuleCatalog
public void RunShouldCallCreateModuleCatalog()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
Assert.IsTrue(bootstrapper.CreateModuleCatalogCalled);
}
开发者ID:xperiandri,项目名称:PortablePrism,代码行数:7,代码来源:MefBootstrapperRunMethodFixture.cs
示例5: RunShouldCallConfigureAggregateCatalog
public void RunShouldCallConfigureAggregateCatalog()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
Assert.IsTrue(bootstrapper.ConfigureAggregateCatalogCalled);
}
开发者ID:selvendiranj,项目名称:compositewpf-copy,代码行数:7,代码来源:MefBootstrapperRunMethodFixture.cs
示例6: CreateContainerShouldNotInitializeContainerProviders
public void CreateContainerShouldNotInitializeContainerProviders()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.CallCreateContainer();
Assert.AreEqual(0, bootstrapper.BaseContainer.Providers.Count);
}
开发者ID:CarlosVV,项目名称:mediavf,代码行数:8,代码来源:MefBootstrapperFixture.cs
示例7: CreateAggregateCatalogShouldInitializeCatalog
public void CreateAggregateCatalogShouldInitializeCatalog()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.CallCreateAggregateCatalog();
Assert.IsNotNull(bootstrapper.BaseAggregateCatalog);
}
开发者ID:CarlosVV,项目名称:mediavf,代码行数:8,代码来源:MefBootstrapperFixture.cs
示例8: CreateContainerShouldInitializeContainer
public void CreateContainerShouldInitializeContainer()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.CallCreateContainer();
Assert.IsNotNull(bootstrapper.BaseContainer);
Assert.IsInstanceOfType(bootstrapper.BaseContainer, typeof(CompositionContainer));
}
开发者ID:CarlosVV,项目名称:mediavf,代码行数:9,代码来源:MefBootstrapperFixture.cs
示例9: RegionNavigationJournalEntryIsRegisteredWithContainer
public void RegionNavigationJournalEntryIsRegisteredWithContainer()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
var actual1 = bootstrapper.BaseContainer.GetExportedValue<IRegionNavigationJournalEntry>();
var actual2 = bootstrapper.BaseContainer.GetExportedValue<IRegionNavigationJournalEntry>();
Assert.IsNotNull(actual1);
Assert.IsNotNull(actual2);
Assert.AreNotSame(actual1, actual2);
}
开发者ID:CarlosVV,项目名称:mediavf,代码行数:12,代码来源:MefBootstrapperFixture.cs
示例10: SingleIRegionBehaviorFactoryIsRegisteredWithContainer
public void SingleIRegionBehaviorFactoryIsRegisteredWithContainer()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
var exported = bootstrapper.BaseContainer.GetExportedValue<IRegionBehaviorFactory>();
Assert.IsNotNull(exported);
}
开发者ID:CarlosVV,项目名称:mediavf,代码行数:8,代码来源:MefBootstrapperFixture.cs
示例11: RegionLifetimeBehaviorIsRegisteredWithContainer
public void RegionLifetimeBehaviorIsRegisteredWithContainer()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
var exported = bootstrapper.BaseContainer.GetExportedValue<RegionMemberLifetimeBehavior>();
Assert.IsNotNull(exported);
}
开发者ID:CarlosVV,项目名称:mediavf,代码行数:8,代码来源:MefBootstrapperFixture.cs
示例12: SingleRegionActiveAwareBehaviorIsRegisteredWithContainer
public void SingleRegionActiveAwareBehaviorIsRegisteredWithContainer()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
var exported = bootstrapper.BaseContainer.GetExportedValue<RegionActiveAwareBehavior>();
Assert.IsNotNull(exported);
}
开发者ID:CarlosVV,项目名称:mediavf,代码行数:8,代码来源:MefBootstrapperFixture.cs
示例13: RunShouldCallTheMethodsInOrder
public async Task RunShouldCallTheMethodsInOrder()
{
await ExecuteOnUIThread(() =>
{
var bootstrapper = new DefaultMefBootstrapper { ShellObject = new UserControl() };
bootstrapper.Run();
Assert.AreEqual("CreateLogger", bootstrapper.MethodCalls[0]);
Assert.AreEqual("CreateModuleCatalog", bootstrapper.MethodCalls[1]);
Assert.AreEqual("ConfigureModuleCatalog", bootstrapper.MethodCalls[2]);
Assert.AreEqual("CreateContainerConfiguration", bootstrapper.MethodCalls[3]);
Assert.AreEqual("ConfigureAggregateCatalog", bootstrapper.MethodCalls[4]);
Assert.AreEqual("CreateContainer", bootstrapper.MethodCalls[5]);
Assert.AreEqual("ConfigureContainer", bootstrapper.MethodCalls[6]);
Assert.AreEqual("ConfigureServiceLocator", bootstrapper.MethodCalls[7]);
//Assert.AreEqual("ConfigureRegionAdapterMappings", bootstrapper.MethodCalls[8]);
//Assert.AreEqual("ConfigureDefaultRegionBehaviors", bootstrapper.MethodCalls[9]);
Assert.AreEqual("RegisterFrameworkExceptionTypes", bootstrapper.MethodCalls[8]);
Assert.AreEqual("CreateShell", bootstrapper.MethodCalls[9]);
Assert.AreEqual("InitializeShell", bootstrapper.MethodCalls[10]);
Assert.AreEqual("InitializeModules", bootstrapper.MethodCalls[11]);
});
}
开发者ID:xperiandri,项目名称:PortablePrism,代码行数:23,代码来源:MefBootstrapperRunMethodFixture.cs
示例14: RunShouldLogAboutRunCompleting
public void RunShouldLogAboutRunCompleting()
{
const string expectedMessageText = "Bootstrapper sequence completed";
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
}
开发者ID:xperiandri,项目名称:PortablePrism,代码行数:8,代码来源:MefBootstrapperRunMethodFixture.cs
示例15: ConfigureContainerAddsAggregateCatalogToContainer
public void ConfigureContainerAddsAggregateCatalogToContainer()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.CallCreateLogger();
bootstrapper.CallCreateAggregateCatalog();
bootstrapper.CallCreateModuleCatalog();
bootstrapper.CallCreateContainer();
bootstrapper.CallConfigureContainer();
var returnedCatalog = bootstrapper.BaseContainer.GetExportedValue<AggregateCatalog>();
Assert.IsNotNull(returnedCatalog);
Assert.AreEqual(typeof(AggregateCatalog), returnedCatalog.GetType());
}
开发者ID:CarlosVV,项目名称:mediavf,代码行数:13,代码来源:MefBootstrapperFixture.cs
示例16: RunShouldLogAboutInitializingModules
public void RunShouldLogAboutInitializingModules()
{
const string expectedMessageText = "Initializing modules";
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
}
开发者ID:xperiandri,项目名称:PortablePrism,代码行数:8,代码来源:MefBootstrapperRunMethodFixture.cs
示例17: SingleBindRegionContextToDependencyObjectBehaviorIsRegisteredWithContainer
public void SingleBindRegionContextToDependencyObjectBehaviorIsRegisteredWithContainer()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
var exported = bootstrapper.BaseContainer.GetExportedValue<BindRegionContextToDependencyObjectBehavior>();
Assert.IsNotNull(exported);
}
开发者ID:CarlosVV,项目名称:mediavf,代码行数:8,代码来源:MefBootstrapperFixture.cs
示例18: SingleSelectorItemsSourceSyncBehaviorIsRegisteredWithContainer
public void SingleSelectorItemsSourceSyncBehaviorIsRegisteredWithContainer()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
var exported = bootstrapper.BaseContainer.GetExportedValue<SelectorItemsSourceSyncBehavior>();
Assert.IsNotNull(exported);
}
开发者ID:CarlosVV,项目名称:mediavf,代码行数:8,代码来源:MefBootstrapperFixture.cs
示例19: CanRunBootstrapper
public void CanRunBootstrapper()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
}
开发者ID:xperiandri,项目名称:PortablePrism,代码行数:5,代码来源:MefBootstrapperRunMethodFixture.cs
示例20: ModuleManagerRunCalled
public void ModuleManagerRunCalled()
{
var bootstrapper = new DefaultMefBootstrapper();
var container = new CompositionContainer();
Mock<IModuleManager> mockModuleManager = SetupModuleManager(container);
bootstrapper.BaseContainer = container;
bootstrapper.CallInitializeModules();
mockModuleManager.Verify(mm => mm.Run(), Times.Once());
}
开发者ID:CarlosVV,项目名称:mediavf,代码行数:13,代码来源:MefBootstrapperFixture.cs
注:本文中的Microsoft.Practices.Prism.MefExtensions.Tests.DefaultMefBootstrapper类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论