All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.ericdriggs.reportcard.xml.junit.JunitParserUtil Maven / Gradle / Ivy

There is a newer version: 0.1.19
Show newest version
package io.github.ericdriggs.reportcard.xml.junit;

import lombok.SneakyThrows;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class JunitParserUtil {
    private JunitParserUtil() {
        //call statically
    }

    public static Testsuites parseTestSuites(String xmlTestSuites) {

        if (xmlTestSuites.contains(" testsuiteList = new ArrayList<>();
//        testsuiteList.add(xmlToTestSuite(xmlTestSuite));
//        Testsuites testsuites = new Testsuites();
//        testsuites.setTestsuite(testsuiteList);
//        return testsuites;
//    }


    @SneakyThrows(JAXBException.class)
    protected static Testsuite xmlToTestSuite(String xmlString) {
        if (xmlString.contains("




© 2015 - 2024 Weber Informatics LLC | Privacy Policy