Example #1
0
        /// <summary>
        /// Constructor.
        /// Note that using this constructor has different effect as setting CategoryId property.
        /// When using this constructor, catId is used as specified, which CategoryId.set changes null to the root cat.
        /// </summary>
        /// <param name="testId">Test Id.</param>
        /// <param name="catId">Category Id. This gets into .</param>
        public TestEntry(TestId testId, TestListCategoryId catId)
        {
            Debug.Assert(testId != null, "testId is null");

            // CatId can be null.
            this.testId     = testId;
            this.categoryId = catId;
        }
Example #2
0
        public TestElement(Guid id, string name, string adapter)
        {
            Debug.Assert(!string.IsNullOrEmpty(name), "name is null");
            Debug.Assert(!string.IsNullOrEmpty(adapter), "adapter is null");

            this.Initialize();

            this.id      = new TestId(id);
            this.name    = name;
            this.adapter = adapter;
        }
Example #3
0
 private void Initialize()
 {
     this.id             = TestId.Empty;
     this.name           = string.Empty;
     this.owner          = string.Empty;
     this.priority       = DefaultPriority;
     this.executionId    = TestExecId.Empty;
     this.testCategories = new TestCategoryItemCollection();
     this.storage        = string.Empty;
     this.isRunnable     = true;
     this.catId          = TestListCategoryId.Uncategorized;
 }
Example #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UnitTestElement"/> class.
        /// </summary>
        /// <param name="id">
        /// The id.
        /// </param>
        /// <param name="name">
        /// The name.
        /// </param>
        /// <param name="executorUriOfAdapter">
        /// The adapter type name.
        /// </param>
        /// <param name="testMethod">
        /// The test method.
        /// </param>
        public UnitTestElement(
            Guid id,
            string name,
            string executorUriOfAdapter,
            TestMethod testMethod)
        {
            Debug.Assert(!string.IsNullOrEmpty(name), "name is null");
            Debug.Assert(!string.IsNullOrEmpty(executorUriOfAdapter), "executorUriOfAdapter is null");
            Debug.Assert(testMethod != null, "testMethod is null");

            this.Initialize();

            this.id   = new TestId(id);
            this.name = name;
            this.executorUriOfAdapter = executorUriOfAdapter;
            this.testMethod           = testMethod;
            Debug.Assert(this.testMethod.ClassName != null, "className is null");
        }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestResultId"/> class.
 /// </summary>
 /// <param name="runId">
 /// The run id.
 /// </param>
 /// <param name="executionId">
 /// The execution id.
 /// </param>
 /// <param name="parentExecutionId">
 /// The parent execution id.
 /// </param>
 /// <param name="testId">
 /// The test id.
 /// </param>
 public TestResultId(Guid runId, TestExecId executionId, TestId testId)
 {
     this.runId       = runId;
     this.executionId = executionId;
     this.testId      = testId;
 }
Example #6
0
 /// <summary>
 /// Constructor.
 /// Note that using this constructor has different effect as setting CategoryId property.
 /// When using this constructor, catId is used as specified, which CategoryId.set changes null to the root cat.
 /// </summary>
 /// <param name="testId">Test Id.</param>
 /// <param name="catId">Category Id. This gets into .</param>
 public TestEntry(TestId testId, TestListCategoryId catId)
 {
     this.testId     = testId;
     this.categoryId = catId;
 }