当前位置: 首页>>代码示例>>C#>>正文


C# IUnitTestProvider类代码示例

本文整理汇总了C#中IUnitTestProvider的典型用法代码示例。如果您正苦于以下问题:C# IUnitTestProvider类的具体用法?C# IUnitTestProvider怎么用?C# IUnitTestProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IUnitTestProvider类属于命名空间,在下文中一共展示了IUnitTestProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ContextFactory

 public ContextFactory(IUnitTestProvider provider, IProjectModelElement project, string assemblyPath, ContextCache cache)
 {
   _provider = provider;
   _cache = cache;
    _project = project;
   _assemblyPath = assemblyPath;
 }
开发者ID:jayhill,项目名称:machine.specifications,代码行数:7,代码来源:ContextFactory.cs

示例2: TestClassManager

 /// <summary>
 /// A container type that handles an entire test class throughout the 
 /// test run.
 /// </summary>
 /// <param name="filter">Test run filter object.</param>
 /// <param name="testHarness">The unit test harness.</param>
 /// <param name="testClass">The test class metadata interface.</param>
 /// <param name="instance">The object instance.</param>
 /// <param name="provider">The unit test provider.</param>
 public TestClassManager(TestRunFilter filter, UnitTestHarness testHarness, ITestClass testClass, object instance, IUnitTestProvider provider) : base(testHarness, provider)
 {
     _filter = filter;
     _testClass = testClass;
     _testExecutionQueue = new CompositeWorkItem();
     _instance = instance;
 }
开发者ID:kvervo,项目名称:HorizontalLoopingSelector,代码行数:16,代码来源:TestClassManager.cs

示例3: AssemblyDispatcher

 public AssemblyDispatcher(UnitTestHarness testHarness, IUnitTestProvider provider, 
     IAssembly testAssembly) : base(testHarness, provider)
 {
     _assembly = testAssembly;
     _testClasses = new TestWorkItemDispatcher();
     _classInstances = new TestClassInstanceCollection();
 }
开发者ID:dfr0,项目名称:moon,代码行数:7,代码来源:AssemblyDispatcher.cs

示例4: TestUnitTestElement

			public TestUnitTestElement(IUnitTestProvider provider, GallioTestElement parent, string testId, string testName, 
				string kind, bool isTestCase, IProject project, IDeclaredElementResolver declaredElementResolver, string assemblyPath, 
				string typeName, string namespaceName) 
				: base(provider, parent, testId, testName, kind, isTestCase, project, declaredElementResolver, assemblyPath, 
				typeName, namespaceName)
			{
			}
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:7,代码来源:GallioTestProviderTests.cs

示例5: CreateFromTest

        public static GallioTestElement CreateFromTest(TestData test, ICodeElementInfo codeElement, IUnitTestProvider provider, 
			GallioTestElement parent)
        {
            if (test == null)
                throw new ArgumentNullException("test");

            // The idea here is to generate a test element object that does not retain any direct
            // references to the code element info and other heavyweight objects.  A test element may
            // survive in memory for quite a long time so we don't want it holding on to all sorts of
            // irrelevant stuff.  Basically we flatten out the test to just those properties that we
            // need to keep.
            var element = new GallioTestElement(provider, parent,
                test.Id,
                test.Name,
                test.Metadata.GetValue(MetadataKeys.TestKind) ?? "Unknown",
                test.IsTestCase,
                ReSharperReflectionPolicy.GetProject(codeElement),
                ReSharperReflectionPolicy.GetDeclaredElementResolver(codeElement),
                GetAssemblyPath(codeElement),
                GetTypeName(codeElement),
                GetNamespaceName(codeElement));

            var categories = test.Metadata[MetadataKeys.Category];
            if (categories.Count != 0)
                element.Categories = UnitTestElementCategory.Create(categories);

            var reason = test.Metadata.GetValue(MetadataKeys.IgnoreReason);
            if (reason != null)
                element.ExplicitReason = reason;

            return element;
        }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:32,代码来源:GallioTestElement6.cs

示例6: StorEvilUnitTestElement

 protected StorEvilUnitTestElement(IUnitTestProvider provider, UnitTestElement parent, IProject project,
                                string title)
     : base(provider, parent)
 {
     Project = project;
     _title = title;
 }
开发者ID:pawelpabich,项目名称:storevil,代码行数:7,代码来源:StorEvilUnitTestElement.cs

示例7: SilverlightUnitTestElement

 public SilverlightUnitTestElement(IUnitTestProvider provider, IUnitTestRunStrategy runStrategy)
 {
     this.runStrategy = runStrategy;
     Id = Guid.NewGuid().ToString();
     Provider = provider;
     Children = new List<IUnitTestElement>();
 }
开发者ID:archnaut,项目名称:AgUnit,代码行数:7,代码来源:SilverlightUnitTestElement.cs

示例8: RegisterUnitTestProvider

 /// <summary>
 /// Register another available unit test provider for the unit test system.
 /// </summary>
 /// <param name="provider">A unit test provider.</param>
 public static void RegisterUnitTestProvider(IUnitTestProvider provider)
 {
     if (!UnitTestProviders.Providers.Contains(provider))
     {
         UnitTestProviders.Providers.Add(provider);
     }
 }
开发者ID:shijiaxing,项目名称:SilverlightToolkit,代码行数:11,代码来源:UnitTestSystem.cs

示例9: TestMethodManager

 /// <summary>
 /// Constructor for a test method manager, which handles executing a single test method 
 /// for a unit test provider.
 /// </summary>
 /// <param name="testHarness">The unit test harness object.</param>
 /// <param name="testClass">The test class metadata object.</param>
 /// <param name="testMethod">The test method metadata object.</param>
 /// <param name="instance">The test class instance.</param>
 /// <param name="provider">The unit test provider.</param>
 public TestMethodManager(UnitTestHarness testHarness, ITestClass testClass, ITestMethod testMethod, object instance, IUnitTestProvider provider)
     : base(testHarness, provider)
 {
     _testClass = testClass;
     _testMethod = testMethod;
     _instance = instance;
 }
开发者ID:jschementi,项目名称:silverlightut,代码行数:16,代码来源:TestMethodManager.cs

示例10: FileExplorer

    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 contextFactory = new ContextFactory(provider, project, assemblyPath);
      var contextSpecificationFactory = new ContextSpecificationFactory(provider, project);
      var behaviorFactory = new BehaviorFactory(provider, project);
      var behaviorSpecificationFactory = new BehaviorSpecificationFactory(provider, project);

      _elementHandlers = new List<IElementHandler>
                         {
                           new ContextElementHandler(contextFactory),
                           new ContextSpecificationElementHandler(contextSpecificationFactory),
                           new BehaviorElementHandler(behaviorFactory, behaviorSpecificationFactory)
                         };
    }
开发者ID:benlovell,项目名称:machine.specifications,代码行数:34,代码来源:FileExplorer.cs

示例11: BaseTestAssembly

 public BaseTestAssembly(IUnitTestProvider provider, UnitTestHarness testHarness, Assembly assembly) {
     this.provider = provider;
     this.testHarness = testHarness;
     this.assembly = assembly;
     this.init = new LazyAssemblyMethodInfo(this.assembly, typeof(AssemblyInitializeAttribute));
     this.cleanup = new LazyAssemblyMethodInfo(this.assembly, typeof(AssemblyCleanupAttribute));
 }
开发者ID:JustGitHubUser,项目名称:DevExpress.Mvvm.Free,代码行数:7,代码来源:BaseTestAssembly.cs

示例12: AssemblyManager

 /// <summary>
 /// Create a new assembly manager, takes in the harness, provider 
 /// reference and actual IAssembly object.
 /// </summary>
 /// <param name="runFilter">The test run filter object.</param>
 /// <param name="testHarness">Harness object.</param>
 /// <param name="provider">The unit test metadata provider.</param>
 /// <param name="testAssembly">The test assembly metadata object.</param>
 public AssemblyManager(TestRunFilter runFilter, UnitTestHarness testHarness, IUnitTestProvider provider, IAssembly testAssembly) : base(testHarness, provider)
 {
     _filter = runFilter;
     _assembly = testAssembly;
     _testClasses = new CompositeWorkItem();
     ClassInstances = new TestClassInstanceDictionary();
 }
开发者ID:modulexcite,项目名称:SilverlightToolkit,代码行数:15,代码来源:AssemblyManager.cs

示例13: Element

    protected Element(IUnitTestProvider provider,

                      UnitTestElement parent,
                      ProjectModelElementEnvoy projectEnvoy,
                      string declaringTypeName,
                      bool isIgnored)
      : base(provider, parent)
    {
      if (projectEnvoy == null && !Shell.Instance.IsTestShell)
      {
        throw new ArgumentNullException("projectEnvoy");
      }

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

      _projectEnvoy = projectEnvoy;
      _declaringTypeName = declaringTypeName;

      if (isIgnored)
      {
        SetExplicit("Ignored");
      }
    }
开发者ID:simonlaroche,项目名称:Simple.Testing,代码行数:26,代码来源:Element.cs

示例14: EnsureSilverlightPlatformSupport

 public static void EnsureSilverlightPlatformSupport(this IUnitTestLaunch launch, ref IUnitTestRun run, IUnitTestProvider provider, ITaskRunnerHostController hostController)
 {
     foreach (var sequence in run.GetRootTasks().ToArray())
     {
         ConvertToSilverlightSequenceIfNecessary(sequence, ref run, launch, provider, hostController);
     }
 }
开发者ID:icnocop,项目名称:AgUnit,代码行数:7,代码来源:SilverlightPlatformSupportExtensions.cs

示例15: XunitTestFakeElement

 public XunitTestFakeElement(IUnitTestProvider provider, IProject project, IClrTypeName typeName, string methodName)
 {
     Provider = provider;
     myProject = project;
     TypeName = typeName;
     myMethodName = methodName;
     State = UnitTestElementState.Fake;
 }
开发者ID:hazzik,项目名称:ReSharper.XUnitTestRunner,代码行数:8,代码来源:XunitTestFakeElement.cs


注:本文中的IUnitTestProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。