org.allurefw.report.XunitData Maven / Gradle / Ivy
The newest version!
package org.allurefw.report;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlType;
import org.allurefw.report.entity.Statistic;
import org.allurefw.report.entity.Time;
import org.allurefw.report.entity.WithStatistic;
/**
* Java class for XunitData complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="XunitData">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="time" type="{urn:report.allurefw.org}Time"/>
* <element name="statistic" type="{urn:report.allurefw.org}Statistic"/>
* <element name="testSuites" minOccurs="0">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="testSuite" type="{urn:report.allurefw.org}TestSuite" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "XunitData", propOrder = {
"time",
"statistic",
"testSuites"
})
public class XunitData implements Serializable, WithStatistic
{
private final static long serialVersionUID = 1L;
@XmlElement(required = true)
protected Time time;
@XmlElement(required = true)
protected Statistic statistic;
@XmlElementWrapper
@XmlElement(name = "testSuite")
protected List testSuites;
/**
* Gets the value of the time property.
*
* @return
* possible object is
* {@link Time }
*
*/
public Time getTime() {
return time;
}
/**
* Sets the value of the time property.
*
* @param value
* allowed object is
* {@link Time }
*
*/
public void setTime(Time value) {
this.time = value;
}
/**
* Gets the value of the statistic property.
*
* @return
* possible object is
* {@link Statistic }
*
*/
public Statistic getStatistic() {
return statistic;
}
/**
* Sets the value of the statistic property.
*
* @param value
* allowed object is
* {@link Statistic }
*
*/
public void setStatistic(Statistic value) {
this.statistic = value;
}
public List getTestSuites() {
if (testSuites == null) {
testSuites = new ArrayList();
}
return testSuites;
}
public void setTestSuites(List testSuites) {
this.testSuites = testSuites;
}
public XunitData withTime(Time value) {
setTime(value);
return this;
}
public XunitData withStatistic(Statistic value) {
setStatistic(value);
return this;
}
public XunitData withTestSuites(TestSuite... values) {
if (values!= null) {
for (TestSuite value: values) {
getTestSuites().add(value);
}
}
return this;
}
public XunitData withTestSuites(Collection values) {
if (values!= null) {
getTestSuites().addAll(values);
}
return this;
}
public XunitData withTestSuites(List testSuites) {
setTestSuites(testSuites);
return this;
}
}