コード例 #1
0
ファイル: TestResult.cs プロジェクト: sshyran/vstest
        /// <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 TestResult(
            Guid runId,
            Guid testId,
            Guid executionId,
            Guid parentExecutionId,
            string resultName,
            string computerName,
            TestOutcome outcome,
            TestType testType,
            TestListCategoryId testCategoryId,
            TrxFileHelper trxFileHelper)
        {
            Debug.Assert(computerName != null, "computername is null");
            Debug.Assert(!Guid.Empty.Equals(executionId), "ExecutionId is empty");
            Debug.Assert(!Guid.Empty.Equals(testId), "TestId is empty");

            this.Initialize();

            this.id           = new TestResultId(runId, executionId, parentExecutionId, testId);
            this.resultName   = resultName;
            this.testType     = testType;
            this.computerInfo = computerName;
            this.outcome      = outcome;
            this.categoryId   = testCategoryId;
            this.relativeTestResultsDirectory = TestRunDirectories.GetRelativeTestResultsDirectory(executionId);
            this.trxFileHelper = trxFileHelper;
        }
コード例 #2
0
ファイル: TestResult.cs プロジェクト: sshyran/vstest
        /// <summary>
        /// Override function for Equals
        /// </summary>
        /// <param name="obj">
        /// The object to compare
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public override bool Equals(object obj)
        {
            TestResultId tmpId = obj as TestResultId;

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

            return(this.runId.Equals(tmpId.runId) && this.executionId.Equals((object)tmpId.executionId));
        }
コード例 #3
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);
        }