org.testobject.appium.common.data.SuiteReport Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testobject-appium-java-api Show documentation
Show all versions of testobject-appium-java-api Show documentation
java wrapper for testobject's appium java apis
package org.testobject.appium.common.data;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Optional;
import java.util.Set;
public class SuiteReport {
public static class Id extends org.testobject.appium.common.data.Id {
public Id(Long value) {
super(value);
}
}
private final Id id;
private final Set testReports;
@JsonCreator
public SuiteReport(@JsonProperty("id") Id id, @JsonProperty("testReports") Set testReports) {
this.id = id;
this.testReports = testReports;
}
public Id getId() {
return id;
}
public Optional getTestReportId(Test test) {
for (TestReport testReport : testReports) {
if (testReport.getTest().equals(test)) {
return Optional.of(testReport.getId());
}
}
return Optional.absent();
}
public Optional getTestDeviceId(Test test) {
for (TestReport testReport : testReports) {
if (testReport.getTest().equals(test)) {
return Optional.of(testReport.getTest().getDeviceId());
}
}
return Optional.absent();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy