public ContextFactory(MSpecUnitTestProvider provider, ProjectModelElementEnvoy projectEnvoy, string assemblyPath, ContextCache cache)
 {
   _provider = provider;
   _cache = cache;
   _projectEnvoy = projectEnvoy;
   _assemblyPath = assemblyPath;
 }
 public ContextFactory(IUnitTestProvider provider, IProjectModelElement project, string assemblyPath, ContextCache cache)
 {
   _provider = provider;
   _cache = cache;
    _project = project;
   _assemblyPath = assemblyPath;
 }
 public BehaviorFactory(MSpecUnitTestProvider provider, IProject project, ProjectModelElementEnvoy projectEnvoy, ContextCache cache)
 {
   _provider = provider;
   _cache = cache;
   _project = project;
   _projectEnvoy = projectEnvoy;
 }
Ejemplo n.º 4
0
 public ContextFactory(IUnitTestProvider provider, ProjectModelElementEnvoy projectEnvoy, string assemblyPath, ContextCache cache)
 {
     _provider     = provider;
     _cache        = cache;
     _projectEnvoy = projectEnvoy;
     _assemblyPath = assemblyPath;
 }
    public FileExplorer(IUnitTestProvider provider,
                        UnitTestElementLocationConsumer consumer,
                        IFile file,
                        CheckForInterrupt interrupted)
    {
      if (file == null)
      {
        throw new ArgumentNullException("file");
      }

      if (provider == null)
      {
        throw new ArgumentNullException("provider");
      }

      _consumer = consumer;
      _file = file;
      _interrupted = interrupted;

      IProject project = file.ProjectFile.GetProject();
      string assemblyPath = UnitTestManager.GetOutputAssemblyPath(project).FullPath;

      var cache = new ContextCache();
      var contextFactory = new ContextFactory(provider, project, assemblyPath, cache);
      var contextSpecificationFactory = new ContextSpecificationFactory(provider, project, cache);
      var behaviorFactory = new BehaviorFactory(provider, project, cache);
      var behaviorSpecificationFactory = new BehaviorSpecificationFactory(provider, project);

      _elementHandlers = new List<IElementHandler>
                         {
                           new ContextElementHandler(contextFactory),
                           new ContextSpecificationElementHandler(contextSpecificationFactory),
                           new BehaviorElementHandler(behaviorFactory, behaviorSpecificationFactory)
                         };
    }
    public AssemblyExplorer(MSpecUnitTestProvider provider,
#if RESHARPER_61
                            IUnitTestElementManager manager,
                            PsiModuleManager psiModuleManager,
                            CacheManager cacheManager,
#endif
                            IMetadataAssembly assembly,
                            IProject project,
                            UnitTestElementConsumer consumer)
    {
      _assembly = assembly;
      _consumer = consumer;

      using (ReadLockCookie.Create())
      {
        var projectEnvoy = new ProjectModelElementEnvoy(project);

        var cache = new ContextCache();
#if RESHARPER_61
        _contextFactory = new ContextFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy, _assembly.Location.FullPath, cache);
        _contextSpecificationFactory = new ContextSpecificationFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy, cache);
        _behaviorFactory = new BehaviorFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy, cache);
        _behaviorSpecificationFactory = new BehaviorSpecificationFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy);
#else
#if RESHARPER_6
        _contextFactory = new ContextFactory(provider, project, projectEnvoy, _assembly.Location.FullPath, cache);
#else
        _contextFactory = new ContextFactory(provider, project, projectEnvoy, _assembly.Location, cache);
#endif
        _contextSpecificationFactory = new ContextSpecificationFactory(provider, project, projectEnvoy, cache);
        _behaviorFactory = new BehaviorFactory(provider, project, projectEnvoy, cache);
        _behaviorSpecificationFactory = new BehaviorSpecificationFactory(provider, project, projectEnvoy);
#endif
      }
    }
    public ContextSpecificationFactory(MSpecUnitTestProvider provider, IProject project, ProjectModelElementEnvoy projectEnvoy, ContextCache cache)
    {
#endif
      _provider = provider;
      _cache = cache;
      _project = project;
      _projectEnvoy = projectEnvoy;
    }
Ejemplo n.º 8
0
        public ContextSpecificationFactory(MSpecUnitTestProvider provider, IProject project, ProjectModelElementEnvoy projectEnvoy, ContextCache cache)
        {
#endif
            _provider     = provider;
            _cache        = cache;
            _project      = project;
            _projectEnvoy = projectEnvoy;
        }
        public ContextFactory(MSpecUnitTestProvider provider, IProject project, ProjectModelElementEnvoy projectEnvoy, string assemblyPath, ContextCache cache)
        {
#endif
            _provider     = provider;
            _cache        = cache;
            _project      = project;
            _projectEnvoy = projectEnvoy;
            _assemblyPath = assemblyPath;
        }
    public FileExplorer(MSpecUnitTestProvider provider,
#if RESHARPER_61
                        IUnitTestElementManager manager,
                        PsiModuleManager psiModuleManager,
                        CacheManager cacheManager,
#endif
                        UnitTestElementLocationConsumer consumer,
                        IFile file,
                        CheckForInterrupt interrupted)
    {
      if (file == null)
      {
        throw new ArgumentNullException("file");
      }

      if (provider == null)
      {
        throw new ArgumentNullException("provider");
      }

      _consumer = consumer;
      _file = file;
      _interrupted = interrupted;

#if RESHARPER_6
      IProject project = file.GetSourceFile().ToProjectFile().GetProject();
#else
      IProject project = file.ProjectFile.GetProject();
#endif
      var projectEnvoy = new ProjectModelElementEnvoy(project);
      string assemblyPath = UnitTestManager.GetOutputAssemblyPath(project).FullPath;

      var cache = new ContextCache();


#if RESHARPER_61
      var contextFactory = new ContextFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy, assemblyPath, cache);
      var contextSpecificationFactory = new ContextSpecificationFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy, cache);
      var behaviorFactory = new BehaviorFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy, cache);
      var behaviorSpecificationFactory = new BehaviorSpecificationFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy);
#else
      var contextFactory = new ContextFactory(provider, project, projectEnvoy, assemblyPath, cache);
      var contextSpecificationFactory = new ContextSpecificationFactory(provider, project, projectEnvoy, cache);
      var behaviorFactory = new BehaviorFactory(provider, project, projectEnvoy, cache);
      var behaviorSpecificationFactory = new BehaviorSpecificationFactory(provider, project, projectEnvoy);
#endif

      _elementHandlers = new List<IElementHandler>
                         {
                           new ContextElementHandler(contextFactory),
                           new ContextSpecificationElementHandler(contextSpecificationFactory),
                           new BehaviorElementHandler(behaviorFactory, behaviorSpecificationFactory)
                         };
    }
    public AssemblyExplorer(MSpecUnitTestProvider provider,
                            IMetadataAssembly assembly,
                            IProject project,
                            UnitTestElementConsumer consumer)
    {
      _provider = provider;
      _assembly = assembly;
      _project = project;
      _consumer = consumer;

      var cache = new ContextCache();
      _contextFactory = new ContextFactory(_provider, _project, _assembly.Location, cache);
      _contextSpecificationFactory = new ContextSpecificationFactory(_provider, _project, cache);
      _behaviorFactory = new BehaviorFactory(_provider, _project, cache);
      _behaviorSpecificationFactory = new BehaviorSpecificationFactory(_provider, _project);
    }
    public AssemblyExplorer(MSpecUnitTestProvider provider,
                            IMetadataAssembly assembly,
                            IProject project,
                            UnitTestElementConsumer consumer)
    {
      _assembly = assembly;
      _consumer = consumer;

      using (ReadLockCookie.Create())
      {
        var projectEnvoy = new ProjectModelElementEnvoy(project);

        var cache = new ContextCache();
        _contextFactory = new ContextFactory(provider, projectEnvoy, _assembly.Location, cache);
        _contextSpecificationFactory = new ContextSpecificationFactory(provider, projectEnvoy, cache);
        _behaviorFactory = new BehaviorFactory(provider, projectEnvoy, cache);
        _behaviorSpecificationFactory = new BehaviorSpecificationFactory(provider, projectEnvoy);
      }
    }
Ejemplo n.º 13
0
 public BehaviorFactory(IUnitTestProvider provider, ProjectModelElementEnvoy projectEnvoy, ContextCache cache)
 {
     _provider     = provider;
     _cache        = cache;
     _projectEnvoy = projectEnvoy;
 }
 public ContextSpecificationFactory(IUnitTestProvider provider, ProjectModelElementEnvoy projectEnvoy, ContextCache cache)
 {
   _provider = provider;
   _cache = cache;
   _projectEnvoy = projectEnvoy;
 }
Ejemplo n.º 15
0
 public ContextFactory(MSpecUnitTestProvider provider, IUnitTestElementManager manager, PsiModuleManager psiModuleManager, CacheManager cacheManager, IProject project, ProjectModelElementEnvoy projectEnvoy, string assemblyPath, ContextCache cache)
 {
   _manager = manager;
   _psiModuleManager = psiModuleManager;
   _cacheManager = cacheManager;
Ejemplo n.º 16
0
 public BehaviorFactory(MSpecUnitTestProvider provider, IUnitTestElementManager manager, PsiModuleManager psiModuleManager, CacheManager cacheManager, IProject project, ProjectModelElementEnvoy projectEnvoy, ContextCache cache)
 {
   _manager = manager;
   _psiModuleManager = psiModuleManager;
   _cacheManager = cacheManager;
 public ContextSpecificationFactory(IUnitTestProvider provider, IProjectModelElement project, ContextCache cache)
 {
   _provider = provider;
   _cache = cache;
   _project = project;
 }
 public BehaviorFactory(IUnitTestProvider provider, IProjectModelElement project, ContextCache cache)
 {
   _provider = provider;
   _cache = cache;
   _project = project;
 }
Ejemplo n.º 19
0
 public BehaviorFactory(IUnitTestProvider provider, IProjectModelElement project, ContextCache cache)
 {
     _provider = provider;
     _cache    = cache;
     _project  = project;
 }
 public ContextFactory(MSpecUnitTestProvider provider, IUnitTestElementManager manager, PsiModuleManager psiModuleManager, CacheManager cacheManager, IProject project, ProjectModelElementEnvoy projectEnvoy, string assemblyPath, ContextCache cache)
 {
     _manager          = manager;
     _psiModuleManager = psiModuleManager;
     _cacheManager     = cacheManager;
 public ContextSpecificationFactory(IUnitTestProvider provider, IProjectModelElement project, ContextCache cache)
 {
     _provider = provider;
     _cache    = cache;
     _project  = project;
 }
Ejemplo n.º 22
0
 public ContextSpecificationFactory(MSpecUnitTestProvider provider, IUnitTestElementManager manager, PsiModuleManager psiModuleManager, CacheManager cacheManager, IProject project, ProjectModelElementEnvoy projectEnvoy, ContextCache cache)
 {
     _manager          = manager;
     _psiModuleManager = psiModuleManager;
     _cacheManager     = cacheManager;
 public ContextSpecificationFactory(IUnitTestProvider provider, ProjectModelElementEnvoy projectEnvoy, ContextCache cache)
 {
     _provider     = provider;
     _cache        = cache;
     _projectEnvoy = projectEnvoy;
 }