appcenter-cli
Version:
Command line tool for Visual Studio App Center
31 lines (30 loc) • 1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.XmlUtilBuilder = void 0;
const nunit_xml_util_1 = require("./nunit-xml-util");
const junit_xml_util_1 = require("./junit-xml-util");
class XmlUtilBuilder {
static buildXmlUtil(artifacts) {
if (artifacts["nunit_xml_zip"]) {
return new nunit_xml_util_1.NUnitXmlUtil();
}
else if (artifacts["junit_xml_zip"]) {
return new junit_xml_util_1.JUnitXmlUtil();
}
else {
throw new Error("Unexpected reports type");
}
}
static buildXmlUtilByString(archiveName) {
if (archiveName === "nunit_xml_zip.zip") {
return new nunit_xml_util_1.NUnitXmlUtil();
}
else if (archiveName === "junit_xml_zip.zip") {
return new junit_xml_util_1.JUnitXmlUtil();
}
else {
throw new Error("Unexpected reports type");
}
}
}
exports.XmlUtilBuilder = XmlUtilBuilder;