public FileExplorer(MSpecUnitTestProvider provider,
                        ElementFactories factories,
                        IFile file,
                        UnitTestElementLocationConsumer consumer,
                        Func<bool> interrupted)
    {
      if (file == null)
      {
        throw new ArgumentNullException("file");
      }

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

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

      var project = file.GetSourceFile().ToProjectFile().GetProject();
        
#if !RESHARPER_8
      _assemblyPath = UnitTestManager.GetOutputAssemblyPath(project).FullPath;
#else
      _assemblyPath = project.GetOutputFilePath().FullPath;
#endif

      _elementHandlers = new List<IElementHandler>
                         {
                           new ContextElementHandler(factories),
                           new ContextSpecificationElementHandler(factories),
                           new BehaviorElementHandler(factories)
                         };
    }
 public MspecTestFileExplorer(MSpecUnitTestProvider provider,
                              ElementFactories factories)
 {
   _provider = provider;
   _factories = factories;
 }
 public AssemblyExplorer(ElementFactories factories)
 {
   _factories = factories;
 }
 public BehaviorElementHandler(ElementFactories factories)
 {
   _factory = factories.Behaviors;
   _behaviorSpecifications = factories.BehaviorSpecifications;
 }
 public ContextElementHandler(ElementFactories factories)
 {
   _factory = factories.Contexts;
 }
 public ContextSpecificationElementHandler(ElementFactories factories)
 {
   _factory = factories.ContextSpecifications;
 }