Esempio n. 1
0
        public XunitTestClassElement(IUnitTestProvider provider, ProjectModelElementEnvoy projectModelElementEnvoy,
                                     DeclaredElementProvider declaredElementProvider, string id, IClrTypeName typeName, string assemblyLocation,
                                     IEnumerable <UnitTestElementCategory> categories)
            : base(provider, null, id, projectModelElementEnvoy, categories)
        {
            this.declaredElementProvider = declaredElementProvider;
            AssemblyLocation             = assemblyLocation;
            TypeName = typeName;

            ShortName = string.Join("+", typeName.TypeNames.Select(FormatTypeName).ToArray());
        }
 public static XunitTestMethodElement CreateTestMethod(IUnitTestProvider provider, IProject project,
                                                       DeclaredElementProvider declaredElementProvider,
                                                       XunitTestClassElement classElement,
                                                       IClrTypeName typeName, string methodName,
                                                       string skipReason,
                                                       IEnumerable<UnitTestElementCategory> categories,
                                                       bool isDynamic = false)
 {
     var id = GetTestMethodId(classElement, typeName, methodName);
     return new XunitTestMethodElement(provider, classElement, new ProjectModelElementEnvoy(project),
                                       declaredElementProvider, id, typeName.GetPersistent(), methodName,
                                       skipReason, categories, isDynamic);
 }
        public static XunitTestMethodElement CreateTestMethod(IUnitTestProvider provider, IProject project,
                                                              DeclaredElementProvider declaredElementProvider,
                                                              XunitTestClassElement classElement,
                                                              IClrTypeName typeName, string methodName,
                                                              string skipReason,
                                                              JetHashSet <string> categories,
                                                              bool isDynamic = false)
        {
            var id = GetTestMethodId(classElement, typeName, methodName);

            return(new XunitTestMethodElement(provider, classElement, new ProjectModelElementEnvoy(project),
                                              declaredElementProvider, id, typeName.GetPersistent(), methodName,
                                              skipReason, categories, isDynamic));
        }
        public XunitTestMethodElement(IUnitTestProvider provider, XunitTestClassElement testClass,
                                      ProjectModelElementEnvoy projectModelElementEnvoy,
                                      DeclaredElementProvider declaredElementProvider,
                                      string id, IClrTypeName typeName, string methodName, string skipReason,
                                      JetHashSet <string> categories, bool isDynamic)
            : base(provider, testClass, id, projectModelElementEnvoy, categories)
        {
            this.declaredElementProvider = declaredElementProvider;
            IsDynamic      = isDynamic;
            TypeName       = typeName;
            MethodName     = methodName;
            ExplicitReason = skipReason;

            ShortName = MethodName;

            if (isDynamic)
            {
                SetState(UnitTestElementState.Dynamic);
            }

            presentation = IsTestInParentClass() ? methodName : string.Format("{0}.{1}", TypeName.ShortName, MethodName);
        }
 public UnitTestElementFactory(XunitTestProvider provider, UnitTestElementManager unitTestManager, DeclaredElementProvider declaredElementProvider)
 {
     this.provider = provider;
     this.unitTestManager = unitTestManager;
     this.declaredElementProvider = declaredElementProvider;
 }
 public UnitTestElementFactory(XunitTestProvider provider, UnitTestElementManager unitTestManager, DeclaredElementProvider declaredElementProvider)
 {
     this.provider                = provider;
     this.unitTestManager         = unitTestManager;
     this.declaredElementProvider = declaredElementProvider;
 }