本文整理匯總了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());
}