/// <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, string ticketNumber, TestOutcome outcome, TestType testType, TestListCategoryId testCategoryId) { 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.ticketNumber = ticketNumber; this.outcome = outcome; this.categoryId = testCategoryId; this.relativeTestResultsDirectory = TestRunDirectories.GetRelativeTestResultsDirectory(executionId); }
/// <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)); }