本文整理汇总了C#中Microsoft.Practices.Prism.MefExtensions.Tests.DefaultMefBootstrapper类的典型用法代码示例。如果您正苦于以下问题:C# DefaultMefBootstrapper类的具体用法?C# DefaultMefBootstrapper怎么用?C# DefaultMefBootstrapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DefaultMefBootstrapper类属于Microsoft.Practices.Prism.MefExtensions.Tests命名空间,在下文中一共展示了DefaultMefBootstrapper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RunShouldCallCreateLogger
public void RunShouldCallCreateLogger()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
Assert.IsTrue(bootstrapper.CreateLoggerCalled);
}
示例2: RunConfiguresServiceLocatorProvider
public void RunConfiguresServiceLocatorProvider()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
Assert.IsTrue(ServiceLocation.ServiceLocator.Current is MefServiceLocatorAdapter);
}
示例3: ContainerDefaultsToNull
public void ContainerDefaultsToNull()
{
var bootstrapper = new DefaultMefBootstrapper();
var container = bootstrapper.BaseContainer;
Assert.IsNull(container);
}
示例4: RunShouldCallCreateModuleCatalog
public void RunShouldCallCreateModuleCatalog()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
Assert.IsTrue(bootstrapper.CreateModuleCatalogCalled);
}
示例5: RunShouldCallConfigureAggregateCatalog
public void RunShouldCallConfigureAggregateCatalog()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
Assert.IsTrue(bootstrapper.ConfigureAggregateCatalogCalled);
}
示例6: CreateContainerShouldNotInitializeContainerProviders
public void CreateContainerShouldNotInitializeContainerProviders()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.CallCreateContainer();
Assert.AreEqual(0, bootstrapper.BaseContainer.Providers.Count);
}
示例7: CreateAggregateCatalogShouldInitializeCatalog
public void CreateAggregateCatalogShouldInitializeCatalog()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.CallCreateAggregateCatalog();
Assert.IsNotNull(bootstrapper.BaseAggregateCatalog);
}
示例8: CreateContainerShouldInitializeContainer
public void CreateContainerShouldInitializeContainer()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.CallCreateContainer();
Assert.IsNotNull(bootstrapper.BaseContainer);
Assert.IsInstanceOfType(bootstrapper.BaseContainer, typeof(CompositionContainer));
}
示例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);
}
示例10: SingleIRegionBehaviorFactoryIsRegisteredWithContainer
public void SingleIRegionBehaviorFactoryIsRegisteredWithContainer()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
var exported = bootstrapper.BaseContainer.GetExportedValue<IRegionBehaviorFactory>();
Assert.IsNotNull(exported);
}
示例11: RegionLifetimeBehaviorIsRegisteredWithContainer
public void RegionLifetimeBehaviorIsRegisteredWithContainer()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
var exported = bootstrapper.BaseContainer.GetExportedValue<RegionMemberLifetimeBehavior>();
Assert.IsNotNull(exported);
}
示例12: SingleRegionActiveAwareBehaviorIsRegisteredWithContainer
public void SingleRegionActiveAwareBehaviorIsRegisteredWithContainer()
{
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
var exported = bootstrapper.BaseContainer.GetExportedValue<RegionActiveAwareBehavior>();
Assert.IsNotNull(exported);
}
示例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]);
});
}
示例14: RunShouldLogAboutRunCompleting
public void RunShouldLogAboutRunCompleting()
{
const string expectedMessageText = "Bootstrapper sequence completed";
var bootstrapper = new DefaultMefBootstrapper();
bootstrapper.Run();
Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
}
示例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());
}