Beispiel #1
0
        public UnityNUnitServiceProvider(ISolution solution,
                                         IPsiModules psiModules,
                                         ISymbolCache symbolCache,
                                         IUnitTestElementIdFactory idFactory,
                                         IUnitTestElementManager elementManager,
                                         NUnitTestProvider provider,
                                         IUnitTestingSettings settings,
                                         ISettingsStore settingsStore,
                                         ISettingsOptimization settingsOptimization,
                                         ISettingsCache settingsCache,
                                         UnitTestingCachingService cachingService,
                                         INUnitTestParametersProvider testParametersProvider,
                                         UnityEditorProtocol editorProtocol,
                                         RunViaUnityEditorStrategy runViaUnityEditorStrategy,
                                         UnitySolutionTracker unitySolutionTracker)
            : base(solution, psiModules, symbolCache, idFactory, elementManager, provider, settings, settingsStore,
                   settingsOptimization, settingsCache, cachingService, testParametersProvider)
        {
            if (solution.GetData(ProjectModelExtensions.ProtocolSolutionKey) == null)
            {
                return;
            }

            myRdUnityModel         = solution.GetProtocolSolution().GetRdUnityModel();
            myEditorProtocol       = editorProtocol;
            myUnityEditorStrategy  = runViaUnityEditorStrategy;
            myUnitySolutionTracker = unitySolutionTracker;
        }
Beispiel #2
0
        public UnityNUnitServiceProvider(ISolution solution,
                                         IPsiModules psiModules,
                                         ISymbolCache symbolCache,
                                         IUnitTestElementIdFactory idFactory,
                                         IUnitTestElementManager elementManager,
                                         NUnitTestProvider provider,
                                         IUnitTestingSettings settings,
                                         ISettingsStore settingsStore,
                                         ISettingsOptimization settingsOptimization,
                                         ISettingsCache settingsCache,
                                         UnitTestingCachingService cachingService,
                                         INUnitTestParametersProvider testParametersProvider,
                                         FrontendBackendHost frontendBackendHost,
                                         BackendUnityHost backendUnityHost,
                                         RunViaUnityEditorStrategy runViaUnityEditorStrategy,
                                         UnitySolutionTracker unitySolutionTracker)
            : base(solution, psiModules, symbolCache, idFactory, elementManager, provider, settings, settingsStore,
                   settingsOptimization, settingsCache, cachingService, testParametersProvider)
        {
            // Only in tests
            if (!frontendBackendHost.IsAvailable)
            {
                return;
            }

            myFrontendBackendModel = frontendBackendHost.Model.NotNull("frontendBackendHost.Model != null");
            myBackendUnityHost     = backendUnityHost;
            myUnityEditorStrategy  = runViaUnityEditorStrategy;
            myUnitySolutionTracker = unitySolutionTracker;
        }
        protected Element(MSpecUnitTestProvider provider,
                          Element parent,
                          IClrTypeName declaringTypeName,
                          UnitTestingCachingService cachingService,
                          IUnitTestElementManager elementManager,
                          bool isIgnored)
        {
            if (declaringTypeName == null)
            {
                throw new ArgumentNullException("declaringTypeName");
            }

            this._provider          = provider;
            this._declaringTypeName = declaringTypeName;
            this._cachingService    = cachingService;
            this._elementManager    = elementManager;

            if (isIgnored)
            {
                this.ExplicitReason = "Ignored";
            }

            this.Parent = parent;

            this.Children     = new BindableCollection <IUnitTestElement>(UT.Locks.ReadLock);
            this._taskFactory = new UnitTestTaskFactory(this._provider.ID);
        }
Beispiel #4
0
 public UnityTestElement([NotNull] IProject project, [NotNull] IClrTypeName clrTypeName, UnitTestElementId id, UnityNUnitServiceProvider unityNUnitServiceProvider, string methodName)
 {
     myUnitTestingCachingService = unityNUnitServiceProvider.CachingService;
     myProject     = project;
     myClrTypeName = clrTypeName;
     myId          = id;
     myUnityNUnitServiceProvider = unityNUnitServiceProvider;
     myMethodName = methodName;
 }
 public BehaviorSpecificationFactory(MSpecUnitTestProvider provider,
                                     IUnitTestElementManager manager,
                                     UnitTestingCachingService cachingService,
                                     IUnitTestElementIdFactory elementIdFactory)
 {
     this._elementIdFactory = elementIdFactory;
     this._provider         = provider;
     _manager        = manager;
     _cachingService = cachingService;
 }
 protected FieldElement(MSpecUnitTestProvider provider,
                        Element parent,
                        IClrTypeName declaringTypeName,
                        UnitTestingCachingService cachingService,
                        IUnitTestElementManager elementManager,
                        string fieldName,
                        bool isIgnored)
     : base(provider, parent, declaringTypeName, cachingService, elementManager, isIgnored || parent.Explicit)
 {
     this._fieldName = fieldName;
 }
Beispiel #7
0
 public ContextSpecificationFactory(MSpecUnitTestProvider provider,
                                    IUnitTestElementManager manager,
                                    IUnitTestElementIdFactory elementIdFactory,
                                    UnitTestingCachingService cachingService,
                                    ElementCache cache)
 {
     this._manager          = manager;
     this._elementIdFactory = elementIdFactory;
     this._cachingService   = cachingService;
     this._provider         = provider;
     this._cache            = cache;
 }
 // ReSharper disable once SuggestBaseTypeForParameter
 public XunitServiceProvider(XunitTestProvider provider,
                             IUnitTestElementManager elementManager,
                             IUnitTestElementIdFactory elementIdFactory,
                             IUnitTestElementCategoryFactory categoryFactory,
                             UnitTestingCachingService cachingService)
 {
     this.elementIdFactory = elementIdFactory;
     CachingService = cachingService;
     ElementManager = elementManager;
     CategoryFactory = categoryFactory;
     Provider = provider;
 }
Beispiel #9
0
 // ReSharper disable once SuggestBaseTypeForParameter
 public XunitServiceProvider(XunitTestProvider provider,
                             IUnitTestElementManager elementManager,
                             IUnitTestElementIdFactory elementIdFactory,
                             IUnitTestElementCategoryFactory categoryFactory,
                             UnitTestingCachingService cachingService)
 {
     this.elementIdFactory = elementIdFactory;
     CachingService        = cachingService;
     ElementManager        = elementManager;
     CategoryFactory       = categoryFactory;
     Provider = provider;
 }
 public UnityNUnitServiceProvider(ISolution solution, IPsiModules psiModules, ISymbolCache symbolCache,
                                  IUnitTestElementIdFactory idFactory, IUnitTestElementManager elementManager, NUnitTestProvider provider,
                                  ISettingsStore settingsStore, ISettingsOptimization settingsOptimization, ISettingsCache settingsCache,
                                  UnitTestingCachingService cachingService, IDotNetCoreSdkResolver dotNetCoreSdkResolver,
                                  UnityEditorProtocol unityEditorProtocol,
                                  RunViaUnityEditorStrategy runViaUnityEditorStrategy,
                                  NUnitOutOfProcessUnitTestRunStrategy nUnitOutOfProcessUnitTestRunStrategy)
     : base(solution, psiModules, symbolCache, idFactory, elementManager, provider, settingsStore,
            settingsOptimization, settingsCache, cachingService, dotNetCoreSdkResolver, nUnitOutOfProcessUnitTestRunStrategy)
 {
     myUnityEditorProtocol = unityEditorProtocol;
     myUnityEditorStrategy = runViaUnityEditorStrategy;
 }
 public ContextSpecificationElement(MSpecUnitTestProvider provider,
                                    UnitTestElementId id,
                                    ContextElement context,
                                    IClrTypeName declaringTypeName,
                                    UnitTestingCachingService cachingService,
                                    IUnitTestElementManager elementManager,
                                    string fieldName,
                                    bool isIgnored)
     : base(provider,
            context,
            declaringTypeName,
            cachingService,
            elementManager,
            fieldName,
            isIgnored || context.Explicit)
 {
     this._id = id;
 }
 public BehaviorSpecificationElement(MSpecUnitTestProvider provider,
                                     UnitTestElementId id,
                                     BehaviorElement behavior,
                                     IClrTypeName declaringTypeName,
                                     UnitTestingCachingService cachingService,
                                     IUnitTestElementManager elementManager,
                                     string fieldName,
                                     bool isIgnored
                                     )
     : base(provider,
            behavior,
            declaringTypeName,
            cachingService,
            elementManager,
            fieldName,
            isIgnored || behavior.Explicit)
 {
     this._id = id;
 }
Beispiel #13
0
        public MspecServiceProvider(
            MspecTestProvider provider,
            ISolution solution,
            UnitTestingCachingService cachingService,
            Lifetime lifetime,
            IUnitTestElementManager elementManager,
            IUnitTestElementIdFactory elementIdFactory,
            IUnitTestElementCategoryFactory categoryFactory,
            IDotNetCoreSdkResolver dotNetCoreSdkResolver)
        {
            _provider              = provider;
            _solution              = solution;
            _elementIdFactory      = elementIdFactory;
            _dotNetCoreSdkResolver = dotNetCoreSdkResolver;
            CategoryFactory        = categoryFactory;
            CachingService         = cachingService;
            ElementManager         = elementManager;

            AddElementHandler(lifetime);
        }
Beispiel #14
0
        public UnityNUnitServiceProvider(ISolution solution, IPsiModules psiModules, ISymbolCache symbolCache,
                                         IUnitTestElementIdFactory idFactory, IUnitTestElementManager elementManager, NUnitTestProvider provider,
                                         ISettingsStore settingsStore, ISettingsOptimization settingsOptimization, ISettingsCache settingsCache,
                                         UnitTestingCachingService cachingService, IDotNetCoreSdkResolver dotNetCoreSdkResolver,
                                         UnityEditorProtocol editorProtocol,
                                         RunViaUnityEditorStrategy runViaUnityEditorStrategy,
                                         NUnitOutOfProcessUnitTestRunStrategy nUnitOutOfProcessUnitTestRunStrategy)
            : base(solution, psiModules, symbolCache, idFactory, elementManager, provider, settingsStore,
                   settingsOptimization, settingsCache, cachingService, dotNetCoreSdkResolver, nUnitOutOfProcessUnitTestRunStrategy)
        {
            if (solution.GetData(ProjectModelExtensions.ProtocolSolutionKey) == null)
            {
                return;
            }

            myRdUnityModel = solution.GetProtocolSolution().GetRdUnityModel();

            myEditorModel         = editorProtocol.UnityModel;
            myUnityEditorStrategy = runViaUnityEditorStrategy;
        }
Beispiel #15
0
        public ContextElement(MSpecUnitTestProvider provider,
                              UnitTestElementId id,
                              IClrTypeName typeName,
                              UnitTestingCachingService cachingService,
                              IUnitTestElementManager elementManager,
                              string assemblyLocation,
                              string subject,
                              IEnumerable <string> tags,
                              bool isIgnored,
                              IUnitTestElementCategoryFactory categoryFactory)
            : base(provider, null, typeName, cachingService, elementManager, isIgnored)
        {
            this._id = id;
            this.AssemblyLocation = assemblyLocation;
            this._subject         = subject;

            if (tags != null)
            {
                this._categories = categoryFactory.Create(tags);
            }
        }