public void InitializeContext() { this.testClass = new ValidationTest(); // Exports test class to MEF VsCompositionContainer.Create(new TypeCatalog(typeof(ValidationTest)), new VsExportProviderSettings( VsExportProvidingPreference.BeforeExportsFromOtherContainers)); this.solution = VsIdeTestHostContext.ServiceProvider.GetService<ISolution>(); this.solution.CreateInstance(this.DeploymentDirectory, "Blank"); this.patternManager = VsIdeTestHostContext.ServiceProvider.GetService<IPatternManager>(); var toolkit = this.patternManager.InstalledToolkits.Single(f => f.Id == "NuPattern.Runtime.IntegrationTests.TestToolkit"); UIThreadInvoker.Invoke(new Action(() => this.product = this.patternManager.CreateProduct(toolkit, "Foo"))); }
public void InitializeContext() { this.testClass = new ValidationTest(); // Exports test class to MEF VsCompositionContainer.Create(new TypeCatalog(typeof(ValidationTest)), new VsExportProviderSettings( VsExportProvidingPreference.BeforeExportsFromOtherContainers)); this.solution = VsIdeTestHostContext.ServiceProvider.GetService <ISolution>(); this.solution.CreateInstance(this.DeploymentDirectory, "Blank"); this.patternManager = VsIdeTestHostContext.ServiceProvider.GetService <IPatternManager>(); var toolkit = this.patternManager.InstalledToolkits.Single(f => f.Id == "NuPattern.Runtime.IntegrationTests.TestToolkit"); UIThreadInvoker.Invoke(new Action(() => this.product = this.patternManager.CreateProduct(toolkit, "Foo"))); }