Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

ITestAdaptor.cs 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. using System.Collections.Generic;
  2. using NUnit.Framework.Interfaces;
  3. namespace UnityEditor.TestTools.TestRunner.Api
  4. {
  5. /// <summary>
  6. /// ```ITestAdaptor``` is a representation of a node in the test tree implemented as a wrapper around the [NUnit](http://www.nunit.org/) [ITest](https://github.com/nunit/nunit/blob/master/src/NUnitFramework/framework/Interfaces/ITest.cs) interface.
  7. /// </summary>
  8. public interface ITestAdaptor
  9. {
  10. /// <summary>
  11. /// The ID of the test tree node. The ID can change if you add new tests to the suite. Use UniqueName, if you want to have a more permanent point of reference.
  12. /// </summary>
  13. string Id { get; }
  14. /// <summary>
  15. /// The name of the test. E.g.,```MyTest```.
  16. /// </summary>
  17. string Name { get; }
  18. /// <summary>
  19. /// The full name of the test. E.g., ```MyNamespace.MyTestClass.MyTest```.
  20. /// </summary>
  21. string FullName { get; }
  22. /// <summary>
  23. /// The total number of test cases in the node and all sub-nodes.
  24. /// </summary>
  25. int TestCaseCount { get; }
  26. /// <summary>
  27. /// Whether the node has any children.
  28. /// </summary>
  29. bool HasChildren { get; }
  30. /// <summary>
  31. /// True if the node is a test suite/fixture, false otherwise.
  32. /// </summary>
  33. bool IsSuite { get; }
  34. /// <summary>
  35. /// The child nodes.
  36. /// </summary>
  37. IEnumerable<ITestAdaptor> Children { get; }
  38. /// <summary>
  39. /// The parent node, if any.
  40. /// </summary>
  41. ITestAdaptor Parent { get; }
  42. /// <summary>
  43. /// The test case timeout in milliseconds. Note that this value is only available on TestFinished.
  44. /// </summary>
  45. int TestCaseTimeout { get; }
  46. /// <summary>
  47. /// The type of test class as an ```NUnit``` <see cref="ITypeInfo"/>. If the node is not a test class, then the value is null.
  48. /// </summary>
  49. ITypeInfo TypeInfo { get; }
  50. /// <summary>
  51. /// The Nunit <see cref="IMethodInfo"/> of the test method. If the node is not a test method, then the value is null.
  52. /// </summary>
  53. IMethodInfo Method { get; }
  54. /// <summary>
  55. /// An array of the categories applied to the test or fixture.
  56. /// </summary>
  57. string[] Categories { get; }
  58. /// <summary>
  59. /// Returns true if the node represents a test assembly, false otherwise.
  60. /// </summary>
  61. bool IsTestAssembly { get; }
  62. /// <summary>
  63. /// The run state of the test node. Either ```NotRunnable```, ```Runnable```, ```Explicit```, ```Skipped```, or ```Ignored```.
  64. /// </summary>
  65. RunState RunState { get; }
  66. /// <summary>
  67. /// The description of the test.
  68. /// </summary>
  69. string Description { get; }
  70. /// <summary>
  71. /// The skip reason. E.g., if ignoring the test.
  72. /// </summary>
  73. string SkipReason { get; }
  74. /// <summary>
  75. /// The ID of the parent node.
  76. /// </summary>
  77. string ParentId { get; }
  78. /// <summary>
  79. /// The full name of the parent node.
  80. /// </summary>
  81. string ParentFullName { get; }
  82. /// <summary>
  83. /// A unique generated name for the test node. E.g., ```Tests.dll/MyNamespace/MyTestClass/[Tests][MyNamespace.MyTestClass.MyTest]```.
  84. /// </summary>
  85. string UniqueName { get; }
  86. /// <summary>
  87. /// A unique name of the parent node. E.g., ```Tests.dll/MyNamespace/[Tests][MyNamespace.MyTestClass][suite]```.
  88. /// </summary>
  89. string ParentUniqueName { get; }
  90. /// <summary>
  91. /// The child index of the node in its parent.
  92. /// </summary>
  93. int ChildIndex { get; }
  94. /// <summary>
  95. /// The mode of the test. Either **Edit Mode** or **Play Mode**.
  96. /// </summary>
  97. TestMode TestMode { get; }
  98. }
  99. }