src.main.java.com.smartbear.readyapi.client.model.XPathContainsAssertion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ready-api-testserver-client Show documentation
Show all versions of ready-api-testserver-client Show documentation
Java client library for creating and executing test recipes against Ready!API TestServer
package com.smartbear.readyapi.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.smartbear.readyapi.client.model.Assertion;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Data structure for the <a herf=\"http://readyapi.smartbear.com/structure/assertions/property/xpath/xpath/match\">XPath Match</a> assertion.
**/
@ApiModel(description = "Data structure for the XPath Match assertion.")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-05-24T08:38:08.699-04:00")
public class XPathContainsAssertion extends Assertion {
private String type = null;
private String xpath = null;
private String expectedContent = null;
private Boolean allowWildcards = false;
private Boolean ignoreNamespaces = false;
private Boolean ignoreComments = false;
/**
* Assertion type. Possible values: - AssertionStruct
- Contains
- Invalid HTTP Status Codes
- JDBC Status
- JDBC Timeout
- JsonPath Count
- JsonPath Match
- Not Contains
- Response SLA
- Script Assertion
- Valid HTTP Status Codes
- XPath Match
- XQuery Match
**/
public XPathContainsAssertion type(String type) {
this.type = type;
return this;
}
@ApiModelProperty(example = "null", value = "Assertion type. Possible values: - AssertionStruct
- Contains
- Invalid HTTP Status Codes
- JDBC Status
- JDBC Timeout
- JsonPath Count
- JsonPath Match
- Not Contains
- Response SLA
- Script Assertion
- Valid HTTP Status Codes
- XPath Match
- XQuery Match
")
@JsonProperty("type")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
/**
* XPath expression used to select content from the test step results.
**/
public XPathContainsAssertion xpath(String xpath) {
this.xpath = xpath;
return this;
}
@ApiModelProperty(example = "null", value = "XPath expression used to select content from the test step results.")
@JsonProperty("xpath")
public String getXpath() {
return xpath;
}
public void setXpath(String xpath) {
this.xpath = xpath;
}
/**
* Expected match results.
**/
public XPathContainsAssertion expectedContent(String expectedContent) {
this.expectedContent = expectedContent;
return this;
}
@ApiModelProperty(example = "null", value = "Expected match results.")
@JsonProperty("expectedContent")
public String getExpectedContent() {
return expectedContent;
}
public void setExpectedContent(String expectedContent) {
this.expectedContent = expectedContent;
}
/**
* Treat *
as wildcard in a match.
**/
public XPathContainsAssertion allowWildcards(Boolean allowWildcards) {
this.allowWildcards = allowWildcards;
return this;
}
@ApiModelProperty(example = "null", value = "Treat *
as wildcard in a match.")
@JsonProperty("allowWildcards")
public Boolean getAllowWildcards() {
return allowWildcards;
}
public void setAllowWildcards(Boolean allowWildcards) {
this.allowWildcards = allowWildcards;
}
/**
* Match in all namespaces.
**/
public XPathContainsAssertion ignoreNamespaces(Boolean ignoreNamespaces) {
this.ignoreNamespaces = ignoreNamespaces;
return this;
}
@ApiModelProperty(example = "null", value = "Match in all namespaces.")
@JsonProperty("ignoreNamespaces")
public Boolean getIgnoreNamespaces() {
return ignoreNamespaces;
}
public void setIgnoreNamespaces(Boolean ignoreNamespaces) {
this.ignoreNamespaces = ignoreNamespaces;
}
/**
* Skip XML comments when matching.
**/
public XPathContainsAssertion ignoreComments(Boolean ignoreComments) {
this.ignoreComments = ignoreComments;
return this;
}
@ApiModelProperty(example = "null", value = "Skip XML comments when matching.")
@JsonProperty("ignoreComments")
public Boolean getIgnoreComments() {
return ignoreComments;
}
public void setIgnoreComments(Boolean ignoreComments) {
this.ignoreComments = ignoreComments;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
XPathContainsAssertion xPathContainsAssertion = (XPathContainsAssertion) o;
return Objects.equals(this.type, xPathContainsAssertion.type) &&
Objects.equals(this.xpath, xPathContainsAssertion.xpath) &&
Objects.equals(this.expectedContent, xPathContainsAssertion.expectedContent) &&
Objects.equals(this.allowWildcards, xPathContainsAssertion.allowWildcards) &&
Objects.equals(this.ignoreNamespaces, xPathContainsAssertion.ignoreNamespaces) &&
Objects.equals(this.ignoreComments, xPathContainsAssertion.ignoreComments) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(type, xpath, expectedContent, allowWildcards, ignoreNamespaces, ignoreComments, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class XPathContainsAssertion {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" xpath: ").append(toIndentedString(xpath)).append("\n");
sb.append(" expectedContent: ").append(toIndentedString(expectedContent)).append("\n");
sb.append(" allowWildcards: ").append(toIndentedString(allowWildcards)).append("\n");
sb.append(" ignoreNamespaces: ").append(toIndentedString(ignoreNamespaces)).append("\n");
sb.append(" ignoreComments: ").append(toIndentedString(ignoreComments)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy