Package jscover.report

Examples of jscover.report.SummaryData


    }

    @Test
    public void shouldCalculateXmlSummaryForYUI3() throws Exception {
        String json = IoUtils.getInstance().loadFromFileSystem(new File("src/test-integration/resources/jscover/report/xml/jscoverage.json"));
        SummaryData summaryData = new SummaryData(jsonDataMerger.jsonToMap(json).values());
        dest = xmlSummary.saveSummary(summaryData, new File("target"), "theVersion");

        XPath xpath = XPathFactory.newInstance().newXPath();
        DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
        Document document = builder.parse(dest);
View Full Code Here


        try {
            DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
            Document doc = documentBuilder.newDocument();

            SummaryData summaryTotal = new SummaryData(data.getFiles());
            Element coverageElement = doc.createElement("coverage");
            doc.appendChild(coverageElement);
            addCoverageAttributes(version, summaryTotal, coverageElement);

            Element sources = doc.createElement("sources");
View Full Code Here

        for (String path : data.getPackageMap().keySet()) {
            Element packageElement = doc.createElement("package");
            packages.appendChild(packageElement);
            packageElement.setAttribute("name", path);
            Set<? extends Coverable> files = data.getPackageMap().get(path);
            SummaryData summaryPackage = new SummaryData(files);
            packageElement.setAttribute("line-rate", "" + summaryPackage.getLineCoverRate());
            packageElement.setAttribute("branch-rate", "" + summaryPackage.getBranchRate());
            packageElement.setAttribute("complexity", "0");

            Element classesElement = doc.createElement("classes");
            packageElement.appendChild(classesElement);
View Full Code Here

TOP

Related Classes of jscover.report.SummaryData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.