Ejemplo n.º 1
0
        public XunitTestMethodElement(XunitServiceProvider services, UnitTestElementId id,
                                      IClrTypeName typeName, string methodName, string skipReason,
                                      bool isDynamic)
            : base(services, id, typeName)
        {
            MethodName     = methodName;
            ExplicitReason = skipReason;
            IsDynamic      = isDynamic;

            ShortName = MethodName;
        }
Ejemplo n.º 2
0
        protected XunitBaseElement(XunitServiceProvider services, UnitTestElementId id, IClrTypeName typeName)
        {
            Services = services;
            TypeName = typeName;

            Id       = id;
            Children = new BindableCollection <IUnitTestElement>(EternalLifetime.Instance, UT.Locks.ReadLock);

            ExplicitReason = string.Empty;
            Categories     = EmptyArray <UnitTestElementCategory> .Instance;
        }
Ejemplo n.º 3
0
        protected XunitBaseElement(XunitServiceProvider services, UnitTestElementId id, IClrTypeName typeName)
        {
            Services = services;
            TypeName = typeName;

            Id = id;
            Children = new BindableCollection<IUnitTestElement>(EternalLifetime.Instance, UT.Locks.ReadLock);

            ExplicitReason = string.Empty;
            Categories = EmptyArray<UnitTestElementCategory>.Instance;
        }
        private T GetElementById <T>(UnitTestElementId id)
            where T : XunitBaseElement
        {
            IUnitTestElement value;

            if (recentlyCreatedElements != null && recentlyCreatedElements.TryGetValue(id, out value))
            {
                return(value as T);
            }
            return(services.ElementManager.GetElementById(id) as T);
        }
 protected FieldElement(
     UnitTestElementId id,
     IUnitTestElement parent,
     IClrTypeName typeName,
     MspecServiceProvider serviceProvider,
     string fieldName,
     bool isIgnored)
     : base(id, parent, typeName, serviceProvider, isIgnored || parent.Explicit)
 {
     FieldName = fieldName;
 }
Ejemplo n.º 6
0
        private T GetElementById <T>(UnitTestElementId id)
            where T : class, IUnitTestElement
        {
            IUnitTestElement element;

            if (myElements.TryGetValue(id, out element))
            {
                return(element as T);
            }

            return(myElementManager.GetElementById(id) as T);
        }
        protected Element(
            UnitTestElementId id,
            IUnitTestElement parent,
            IClrTypeName typeName,
            MspecServiceProvider serviceProvider,
            bool isIgnored)
        {
            _serviceProvider = serviceProvider;

            Id             = id;
            TypeName       = typeName;
            Parent         = parent;
            ExplicitReason = isIgnored ? "Ignored" : string.Empty;
        }
 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 ContextSpecificationElement(MSpecUnitTestProvider provider,
                                    IPsi psiModuleManager,
                                    ICache cacheManager,
                                    ProjectModelElementEnvoy project,
                                    ContextElement context,
                                    IClrTypeName declaringTypeName,
                                    string fieldName,
                                    bool isIgnored)
     : base(provider,
            psiModuleManager,
            cacheManager,
            context,
            project,
            declaringTypeName,
            fieldName,
            isIgnored || context.Explicit)
 {
     this._id = CreateId(provider, context, fieldName);
 }
 public ContextSpecificationElement(MSpecUnitTestProvider provider,
                                    IPsi psiModuleManager,
                                    ICache cacheManager,
                                    ProjectModelElementEnvoy project,
                                    ContextElement context,
                                    IClrTypeName declaringTypeName,
                                    string fieldName,
                                    bool isIgnored)
     : base(provider,
            psiModuleManager,
            cacheManager,
            context,
            project,
            declaringTypeName,
            fieldName,
            isIgnored || context.Explicit)
 {
     this._id = CreateId(provider, context, fieldName);
 }
 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;
 }
 public BehaviorSpecificationElement(MSpecUnitTestProvider provider,
                                     IPsi psiModuleManager,
                                     ICache cacheManager,
                                     ProjectModelElementEnvoy projectEnvoy,
                                     BehaviorElement behavior,
                                     IClrTypeName declaringTypeName,
                                     string fieldName,
                                     bool isIgnored
                                     )
     : base(provider,
            psiModuleManager,
            cacheManager,
            behavior,
            projectEnvoy,
            declaringTypeName,
            fieldName,
            isIgnored || behavior.Explicit)
 {
     this._id = CreateId(provider, behavior, fieldName);
 }
 public BehaviorSpecificationElement(MSpecUnitTestProvider provider,
                                     IPsi psiModuleManager,
                                     ICache cacheManager,
                                     ProjectModelElementEnvoy projectEnvoy,
                                     BehaviorElement behavior,
                                     IClrTypeName declaringTypeName,
                                     string fieldName,
                                     bool isIgnored
   )
     : base(provider,
            psiModuleManager,
            cacheManager,
            behavior,
            projectEnvoy,
            declaringTypeName,
            fieldName,
            isIgnored || behavior.Explicit)
 {
     this._id = CreateId(provider, behavior, fieldName);
 }
Ejemplo n.º 14
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);
            }
        }
        public ContextElement(MSpecUnitTestProvider provider,
                              IPsi psiModuleManager,
                              ICache cacheManager,
                              ProjectModelElementEnvoy projectEnvoy,
                              IClrTypeName typeName,
                              string assemblyLocation,
                              string subject,
                              IEnumerable <string> tags,
                              bool isIgnored,
                              IUnitTestCategoryFactory categoryFactory)
            : base(provider, psiModuleManager, cacheManager, null, projectEnvoy, typeName, isIgnored)
        {
            this._id = CreateId(provider, (IProject)projectEnvoy.GetValidProjectElement(), subject, this.TypeName.FullName, tags);
            this.AssemblyLocation = assemblyLocation;
            this._subject         = subject;

            if (tags != null)
            {
                this._categories = categoryFactory.Create(tags);
            }
        }
 public BehaviorElement(MSpecUnitTestProvider provider,
                        IPsi psiModuleManager,
                        ICache cacheManager,
                        UnitTestElementId id,
                        ContextElement context,
                        ProjectModelElementEnvoy projectEnvoy,
                        IClrTypeName declaringTypeName,
                        string fieldName,
                        bool isIgnored,
                        string fieldType)
     : base(provider,
            psiModuleManager,
            cacheManager,
            context,
            projectEnvoy,
            declaringTypeName,
            fieldName,
            isIgnored || context.Explicit)
 {
     this.FieldType = fieldType;
     this._id = id;
 }
 public BehaviorElement(MSpecUnitTestProvider provider,
                        IPsi psiModuleManager,
                        ICache cacheManager,
                        // ReSharper disable SuggestBaseTypeForParameter
                        ContextElement context,
                        // ReSharper restore SuggestBaseTypeForParameter
                        ProjectModelElementEnvoy projectEnvoy,
                        IClrTypeName declaringTypeName,
                        string fieldName,
                        bool isIgnored,
                        string fieldType)
     : base(provider,
            psiModuleManager,
            cacheManager,
            context,
            projectEnvoy,
            declaringTypeName,
            fieldName,
            isIgnored || context.Explicit)
 {
     this.FieldType = fieldType;
     this._id       = CreateId(provider, context, fieldType, fieldName);
 }
 public BehaviorElement(MSpecUnitTestProvider provider,
                        IPsi psiModuleManager,
                        ICache cacheManager,
     // ReSharper disable SuggestBaseTypeForParameter
                        ContextElement context,
     // ReSharper restore SuggestBaseTypeForParameter
                        ProjectModelElementEnvoy projectEnvoy,
                        IClrTypeName declaringTypeName,
                        string fieldName,
                        bool isIgnored,
                        string fieldType)
     : base(provider,
            psiModuleManager,
            cacheManager,
            context,
            projectEnvoy,
            declaringTypeName,
            fieldName,
            isIgnored || context.Explicit)
 {
     this.FieldType = fieldType;
     this._id = CreateId(provider, context, fieldType, fieldName);
 }
Ejemplo n.º 19
0
 public TestIdentity(ITestProvider provider, IProject project, IIdentity wrappedIdentity, IUnitTestElementIdFactory unitTestElementIdFactory)
     : this(provider, wrappedIdentity)
 {
     _elementId = unitTestElementIdFactory.Create(_provider, new PersistentProjectId(project), Absolute);
 }
Ejemplo n.º 20
0
 public TestIdentity(ITestProvider provider, IProject project, IIdentity wrappedIdentity, IUnitTestElementIdFactory unitTestElementIdFactory)
     : this(provider, wrappedIdentity)
 {
     _elementId = unitTestElementIdFactory.Create(_provider, new PersistentProjectId(project), Absolute);
 }
Ejemplo n.º 21
0
        public XunitInheritedTestMethodContainerElement(XunitServiceProvider services, UnitTestElementId id,
                                                        IClrTypeName typeName, string methodName)
            : base(services, id, typeName)
        {
            this.methodName = methodName;
            ShortName       = methodName;

            // ReSharper disable once RedundantBaseQualifier
            base.State = UnitTestElementState.Fake;
        }
Ejemplo n.º 22
0
 public TestIdentity(UnitTestElementId elementId, IIdentity wrappedIdentity)
     : this(wrappedIdentity)
 {
     _elementId = elementId;
 }
Ejemplo n.º 23
0
        public TestIdentity(UnitTestElementId elementId, IIdentity wrappedIdentity)
        {
            _wrappedIdentity = wrappedIdentity;

            ElementId = elementId;
        }
Ejemplo n.º 24
0
 public TestIdentity(UnitTestElementId elementId, IIdentity wrappedIdentity)
     : this(wrappedIdentity)
 {
     _elementId = elementId;
 }
Ejemplo n.º 25
0
 public SilverlightUnitTestElement(UnitTestElementId id, IUnitTestRunStrategy runStrategy)
 {
     this.runStrategy = runStrategy;
     this.Id = id;
     this.Children = new List<IUnitTestElement>();
 }
Ejemplo n.º 26
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;
 }
Ejemplo n.º 27
0
 public XunitTestTheoryElement(XunitServiceProvider services, UnitTestElementId id,
                               IClrTypeName typeName, string shortName)
     : base(services, id, typeName)
 {
     ShortName = shortName;
 }