private ITestDriver CreateTestDriver() { var excludedTestFrameworkIds = new List <string>(); #if RESHARPER_60 var unitTestManager = UnitTestManager.GetInstance(provider.Solution); var unitTestProviders = unitTestManager.GetEnabledProviders(); #else var unitTestProviders = provider.UnitTestProvidersManager.GetEnabledProviders(); #endif foreach (var testProvider in unitTestProviders) { IList <string> frameworkIds; if (IncompatibleProviders.TryGetValue(testProvider.ID, out frameworkIds)) { excludedTestFrameworkIds.AddRange(frameworkIds); } } var testFrameworkSelector = new TestFrameworkSelector { Filter = testFrameworkHandle => !excludedTestFrameworkIds.Contains(testFrameworkHandle.Id), FallbackMode = TestFrameworkFallbackMode.Approximate }; return(testFrameworkManager.GetTestDriver(testFrameworkSelector, logger)); }
public SilverlightXunitTestFileExplorer(ISolution solution) { provider = UnitTestManager.GetInstance(solution).GetProvider(ProviderId); if (provider == null) { xUnitInstalled = false; provider = UnitTestManager.GetInstance(solution).GetProvider(SilverlightUnitTestProvider.RunnerId); } }
private ITestDriver CreateTestDriver() { var excludedTestFrameworkIds = new List <string>(); foreach (IUnitTestProvider provider in UnitTestManager.GetInstance(SolutionManager.Instance.CurrentSolution).GetEnabledProviders()) { IList <string> frameworkIds; if (IncompatibleProviders.TryGetValue(provider.ID, out frameworkIds)) { excludedTestFrameworkIds.AddRange(frameworkIds); } } var testFrameworkSelector = new TestFrameworkSelector() { Filter = testFrameworkHandle => !excludedTestFrameworkIds.Contains(testFrameworkHandle.Id), FallbackMode = TestFrameworkFallbackMode.Approximate }; return(testFrameworkManager.GetTestDriver(testFrameworkSelector, logger)); }