• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IUnitTestProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: UnitTestFrameworkAssembly

		public UnitTestFrameworkAssembly(IUnitTestProvider provider, UnitTestHarness unitTestHarness, Assembly assembly)
		{
			this.provider = provider;
			harness = unitTestHarness;
			this.assembly = assembly;
			lazyMethodInfo = new LazyAssemblyMethodInfo(this.assembly, ProviderAttributes.AssemblyInitialize);
			cleanup = new LazyAssemblyMethodInfo(this.assembly, ProviderAttributes.AssemblyCleanup);
		}
开发者ID:925coder,项目名称:ravendb,代码行数:8,代码来源:UnitTestFrameworkAssembly.cs


示例17: MetadataExplorer

 public MetadataExplorer(IUnitTestProvider provider, ISolution solution, IProject project, UnitTestElementConsumer consumer)
 {
     testProvider = provider;
     this.consumer = consumer;
     this.project = project;
     this.solution = solution;
     projectModel = new ProjectModelElementEnvoy(this.project);
 }
开发者ID:AngelPortal,项目名称:NBehave,代码行数:8,代码来源:MetadataExplorer.cs


示例18: BddTestAssembly

 /// <summary>
 /// Creates a new unit test assembly wrapper.
 /// </summary>
 /// <param name="provider">Unit test metadata provider.</param>
 /// <param name="unitTestHarness">A reference to the unit test harness.</param>
 /// <param name="assembly">Assembly reflection object.</param>
 public BddTestAssembly(IUnitTestProvider provider, UnitTestHarness unitTestHarness, Assembly assembly)
 {
     _provider = provider;
     _harness = unitTestHarness;
     _assembly = assembly;
     _init = new LazyAssemblyMethodInfo(_assembly, typeof(AssemblyInitializeAttribute));
     _cleanup = new LazyAssemblyMethodInfo(_assembly, typeof(AssemblyCleanupAttribute));
 }
开发者ID:richardszalay,项目名称:build-scout,代码行数:14,代码来源:BddTestAssembly.cs


示例19: UnitTestFrameworkAssembly

 /// <summary>
 /// Creates a new unit test assembly wrapper.
 /// </summary>
 /// <param name="provider">Unit test metadata provider.</param>
 /// <param name="unitTestHarness">A reference to the unit test harness.</param>
 /// <param name="assembly">Assembly reflection object.</param>
 public UnitTestFrameworkAssembly(IUnitTestProvider provider, UnitTestHarness unitTestHarness, Assembly assembly)
 {
     _provider = provider;
     _harness = unitTestHarness;
     _assembly = assembly;
     _init = new LazyAssemblyMethodInfo(_assembly, ProviderAttributes.AssemblyInitialize);
     _cleanup = new LazyAssemblyMethodInfo(_assembly, ProviderAttributes.AssemblyCleanup);
 }
开发者ID:shijiaxing,项目名称:SilverlightToolkit,代码行数:14,代码来源:UnitTestFrameworkAssembly.cs


示例20: TestClassDispatcher

 public TestClassDispatcher(
     UnitTestHarness testHarness, ITestClass testClass, 
     object instance, IUnitTestProvider provider) 
     : base(testHarness, provider)
 {
     _testClass = testClass;
     _testExecutionQueue = new TestWorkItemDispatcher();
     _instance = instance;
 }
开发者ID:dfr0,项目名称:moon,代码行数:9,代码来源:TestClassDispatcher.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IUnityContainer类代码示例发布时间:2022-05-24
下一篇:
C# IUnitTestElement类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap