"use strict";
var test_case_result_1 = require("./test-case-result");
var test_outcome_1 = require("./test-outcome");
var TestResults = (function () {
function TestResults(_test) {
this._test = _test;
this._testCaseResults = [];
}
Object.defineProperty(TestResults.prototype, "outcome", {
get: function () {
var outcomes = this._testCaseResults.map(function (testCaseResult) { return testCaseResult.outcome; });
Iif (outcomes.indexOf(test_outcome_1.TestOutcome.Error) !== -1) {
return test_outcome_1.TestOutcome.Error;
}
Iif (outcomes.indexOf(test_outcome_1.TestOutcome.Fail) !== -1) {
return test_outcome_1.TestOutcome.Fail;
}
if (outcomes.indexOf(test_outcome_1.TestOutcome.Pass) !== -1) {
return test_outcome_1.TestOutcome.Pass;
}
return test_outcome_1.TestOutcome.Skip;
},
enumerable: true,
configurable: true
});
TestResults.prototype.addTestCaseResult = function (args, error) {
var testCaseResult = new test_case_result_1.TestCaseResult(this._test, args, error);
this._testCaseResults.push(testCaseResult);
return testCaseResult;
};
return TestResults;
}());
exports.TestResults = TestResults;
//# sourceMappingURL=test-results.js.map |