public void ExploreProjects(IDictionary <IProject, FileSystemPath> projects, MetadataLoader loader, IUnitTestElementsObserver observer, CancellationToken cancellationToken) { var explorer = new XunitTestMetadataExplorer(new UnitTestElementFactory(services, observer.OnUnitTestElementChanged)); metadataElementsSource.ExploreProjects(projects, loader, observer, explorer.ExploreAssembly, cancellationToken); observer.OnCompleted(); }
public void ExploreProjects(IDictionary<IProject, FileSystemPath> projects, MetadataLoader loader, IUnitTestElementsObserver observer) { var silverlightProjects = projects.Where(p => p.Key.IsSilverlight()).ToDictionary(p => p.Key, p => p.Value); this.metadataElementsSource.ExploreProjects(silverlightProjects, loader, observer, this.ExploreAssembly); observer.OnCompleted(); }
public void ExploreProjects(IDictionary <IProject, FileSystemPath> projects, MetadataLoader loader, IUnitTestElementsObserver observer) { var explorer = new MSpecTestMetadataExplorer(_provider, _assemblyExplorer); _metadataElementsSource.ExploreProjects(projects, loader, observer, explorer.ExploreAssembly); observer.OnCompleted(); }
public void Explore(IProject project, IMetadataAssembly assembly, IUnitTestElementsObserver observer, CancellationToken cancellationToken) { // TODO: ILMerge / embedded reference //if (!referencedAssemblies.Any(x => x.StartsWith("TestFx"))) var frameworkPrefix = typeof(IRootRunner).Assembly.GetName().Name; var referencedAssemblies = assembly.ReferencedAssembliesNames.Select(x => x.Name); if (!referencedAssemblies.Any(x => x.StartsWith(frameworkPrefix))) { return; } using (ReadLockCookie.Create()) { var testAssembly = assembly.ToTestAssembly(project, notInterrupted: () => !cancellationToken.IsCancellationRequested); if (testAssembly == null) { return; } var testElements = testAssembly.TestMetadatas.Select(_testElementFactory.GetOrCreateClassTestElementRecursively); var allTestElements = testElements.SelectMany(x => x.DescendantsAndSelf(y => y.Children)).ToList(); foreach (var testElement in allTestElements) { observer.OnUnitTestElement(testElement); observer.OnUnitTestElementChanged(testElement); } observer.OnCompleted(); } }
public void ExploreFile(IFile psiFile, IUnitTestElementsObserver observer, Func<bool> interrupted) { if (!IsProjectFile(psiFile)) return; var explorer = new MspecTestFileExplorer(_provider, _elementFactories); explorer.ExploreFile(psiFile, observer, interrupted); observer.OnCompleted(); }
public void ExploreFile(IFile psiFile, IUnitTestElementsObserver observer, Func<bool> interrupted) { if (!IsProjectFile(psiFile)) return; var elementFactory = new UnitTestElementFactory(services, observer.OnUnitTestElementChanged); psiFile.ProcessDescendants(new XunitPsiFileExplorer(elementFactory, observer, psiFile, interrupted, searchDomainFactory)); observer.OnCompleted(); }
public void ExploreProjects( [NotNull] IDictionary <IProject, FileSystemPath> projects, [NotNull] MetadataLoader loader, [NotNull] IUnitTestElementsObserver observer, CancellationToken cancellationToken) { _metadataElementsSource.ExploreProjects(projects, loader, observer, _testMetadataExplorer.Explore, cancellationToken); observer.OnCompleted(); }
public void ProcessFile(IFile psiFile, IUnitTestElementsObserver observer, Func <bool> interrupted) { var factory = new UnitTestElementFactory(_serviceProvider, observer.TargetFrameworkId); var explorer = new MspecPsiFileExplorer(_searchDomainFactory, factory, observer, interrupted); psiFile.ProcessDescendants(explorer); observer.OnCompleted(); }
public void ExploreProjects( IDictionary<IProject, FileSystemPath> projects, MetadataLoader loader, IUnitTestElementsObserver observer, CancellationToken cancellationToken) { var explorer = new FixieMetadataExplorer(); metadataElementsSource.ExploreProjects(projects, loader, observer, explorer.ExploreAssembly, cancellationToken); observer.OnCompleted(); }
public void ExploreFile(IFile psiFile, IUnitTestElementsObserver observer, Func <bool> interrupted) { if (!IsProjectFile(psiFile)) { return; } var elementFactory = new UnitTestElementFactory(services, observer.OnUnitTestElementChanged); psiFile.ProcessDescendants(new XunitPsiFileExplorer(elementFactory, observer, psiFile, interrupted, searchDomainFactory)); observer.OnCompleted(); }
public void ExploreFile(IFile psiFile, IUnitTestElementsObserver observer, Func <bool> interrupted) { if (!IsProjectFile(psiFile)) { return; } var explorer = new MspecTestFileExplorer(_provider, _elementFactories); explorer.ExploreFile(psiFile, observer, interrupted); observer.OnCompleted(); }
public void ProcessFile(IFile psiFile, IUnitTestElementsObserver observer, Func <bool> interrupted) { _testFileExplorer.Explore( psiFile, x => { // TODO: ask Jenya observer.OnUnitTestElementDisposition(x); observer.OnUnitTestElementChanged(x.UnitTestElement); }, () => !interrupted()); observer.OnCompleted(); }
public override void ProcessProject( IProject project, FileSystemPath assemblyPath, MetadataLoader loader, IUnitTestElementsObserver observer, CancellationToken token) { var factory = new UnitTestElementFactory(_serviceProvider, observer.TargetFrameworkId); var explorer = new MspecTestMetadataExplorer(factory, observer); MetadataElementsSource.ExploreProject(project, assemblyPath, loader, observer, _logger, token, assembly => explorer.ExploreAssembly(project, assembly, token)); observer.OnCompleted(); }
public override void ProcessProject( [NotNull] IProject project, [NotNull] FileSystemPath assemblyPath, [NotNull] MetadataLoader loader, [NotNull] IUnitTestElementsObserver observer, CancellationToken token) { MetadataElementsSource.ExploreProject( project, assemblyPath, loader, observer, _logger, token, metadataAssembly => _testMetadataExplorer.Explore(project, metadataAssembly, observer, token)); observer.OnCompleted(); }
public void ProcessFile(IFile psiFile, IUnitTestElementsObserver observer, Func <bool> interrupted) { if (!myClrLanguagesKnown.AllLanguages.Any(language => Equals(language, psiFile.Language))) { return; } // external sources case. var projectFile = psiFile.GetSourceFile().ToProjectFile(); if (projectFile == null) { return; } var factory = new UnityTestElementFactory(myIdFactory, myUnityTestProvider, myUnitTestElementManager, myServiceProvider); var fileExplorer = new UnityTestFileExplorer(psiFile, factory, myUnitTestAttributeCache, observer, interrupted, projectFile.GetProject()); psiFile.ProcessDescendants(fileExplorer); observer.OnCompleted(); }
public void ExploreProjects(IDictionary<IProject, FileSystemPath> projects, MetadataLoader loader, IUnitTestElementsObserver observer, CancellationToken cancellationToken) { _metadataElementsSource.ExploreProjects(projects, loader, observer, _testMetadataExplorer.Explore, cancellationToken); observer.OnCompleted(); }
public void ExploreFile(IFile psiFile, IUnitTestElementsObserver observer, Func<bool> interrupted) { _testFileExplorer.Explore(psiFile, observer.OnUnitTestElementDisposition, () => !interrupted()); observer.OnCompleted(); }
public void ExploreProjects(IDictionary<IProject, FileSystemPath> projects, MetadataLoader loader, IUnitTestElementsObserver observer) { var explorer = new MSpecTestMetadataExplorer(_provider, _assemblyExplorer); _metadataElementsSource.ExploreProjects(projects, loader, observer, explorer.ExploreAssembly); observer.OnCompleted(); }
public void ExploreFile(IFile psiFile, IUnitTestElementsObserver observer, Func <bool> interrupted) { _testFileExplorer.Explore(psiFile, observer.OnUnitTestElementDisposition, () => !interrupted()); observer.OnCompleted(); }