コード例 #1
0
ファイル: TestEntry.cs プロジェクト: zcsizmadia/vstest
        /// <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;
        }
コード例 #2
0
        /// <summary>
        /// Constructor for TestListCategory .
        /// </summary>
        /// <param name="name">The name of new category.</param>
        /// <param name="parentCategoryId">Id of parent category. Use TestListCategoryId.Root for top level categories.</param>
        public TestListCategory(string name, TestListCategoryId parentCategoryId)
        {
            EqtAssert.StringNotNullOrEmpty(name, "name");
            EqtAssert.ParameterNotNull(parentCategoryId, "parentCategoryId");

            this.name             = name;
            this.parentCategoryId = parentCategoryId;
        }
コード例 #3
0
        /// <summary>
        /// Override function for Equals.
        /// </summary>
        /// <param name="other">
        /// The object to compare.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public override bool Equals(object other)
        {
            TestListCategoryId testListCategoryId = other as TestListCategoryId;

            if (testListCategoryId == null)
            {
                return(false);
            }

            return(this.id.Equals(testListCategoryId.id));
        }
コード例 #4
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;
 }
コード例 #5
0
 public TestResultAggregation(
     Guid runId,
     Guid testId,
     Guid executionId,
     Guid parentExecutionId,
     string resultName,
     string computerName,
     TestOutcome outcome,
     TestType testType,
     TestListCategoryId testCategoryId) : base(runId, testId, executionId, parentExecutionId, resultName, computerName, outcome, testType, testCategoryId)
 {
 }
コード例 #6
0
 public UnitTestResult(
     Guid runId,
     Guid testId,
     Guid executionId,
     Guid parentExecutionId,
     string resultName,
     string computerName,
     TestOutcome outcome,
     TestType testType,
     TestListCategoryId testCategoryId,
     TrxFileHelper trxFileHelper
     ) : base(runId, testId, executionId, parentExecutionId, resultName, computerName, outcome, testType, testCategoryId, trxFileHelper)
 {
 }
コード例 #7
0
ファイル: UnitTestResult.cs プロジェクト: navin22/nvstest
        /// <summary>
        /// Initializes a new instance of the <see cref="TestResult"/> class.
        /// </summary>
        /// <param name="computerName">
        /// The computer name.
        /// </param>
        /// <param name="runId">
        /// The run id.
        /// </param>
        /// <param name="test">
        /// The test.
        /// </param>
        /// <param name="outcome">
        /// The outcome.
        /// </param>
        public UnitTestResult(string computerName, Guid runId, UnitTestElement test, TestOutcome outcome)
        {
            Debug.Assert(computerName != null, "computername is null");
            Debug.Assert(test != null, "test is null");
            Debug.Assert(!Guid.Empty.Equals(test.ExecutionId.Id), "ExecutionId is empty");
            Debug.Assert(!Guid.Empty.Equals(test.Id.Id), "Id is empty");

            this.Initialize();

            this.id           = new TestResultId(runId, test.ExecutionId, test.Id);
            this.testName     = test.Name;
            this.testType     = test.TestType;
            this.computerInfo = computerName;

            this.outcome    = outcome;
            this.categoryId = test.CategoryId;
            this.relativeTestResultsDirectory = TestRunDirectories.GetRelativeTestResultsDirectory(test.ExecutionId.Id);
        }
コード例 #8
0
ファイル: TestListCategory.cs プロジェクト: zcsizmadia/vstest
 /// <summary>
 /// Used internally for fake uncategorized category.
 /// </summary>
 /// <param name="name">
 /// Category name.
 /// </param>
 /// <param name="id">
 /// Category id.
 /// </param>
 /// <param name="parentId">
 /// The parent Id.
 /// </param>
 private TestListCategory(string name, TestListCategoryId id, TestListCategoryId parentId) : this(name, parentId)
 {
     EqtAssert.ParameterNotNull(id, "id");
     this.id = id;
 }
コード例 #9
0
ファイル: TestEntry.cs プロジェクト: HeroMaxPower/vstest
 /// <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;
 }