"use strict";
var TestFunctionGenerator = (function () {
/* istanbul ignore next */ function TestFunctionGenerator() {
}
TestFunctionGenerator.prototype.fillTestFile = function (testFile, structures) {
var _loop_1 = function (structure) {
// todo: support structures with type parameters
if (structure.getTypeParameters().length > 0)
return "continue";
testFile.addFunction({
name: "run" + structure.getName() + "Tests",
isExported: true,
parameters: [{
name: "actual",
type: structure.getNameWithTypeParameters()
}, {
name: "expected",
type: structure.getTestStructureNameWithTypeParameters()
}],
onWriteFunctionBody: function (writer) {
writer.writeLine("new TestRunnerFactory().get" + structure.getName() + "TestRunner().runTest(actual, expected);");
}
});
};
for (var _i = 0, structures_1 = structures; _i < structures_1.length; _i++) {
var structure = structures_1[_i];
_loop_1(structure);
}
};
return TestFunctionGenerator;
}());
exports.TestFunctionGenerator = TestFunctionGenerator;
//# sourceMappingURL=TestFunctionGenerator.js.map
|