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

org.touchbit.testrail4j.gson.model.TRStep Maven / Gradle / Ivy

The newest version!

package org.touchbit.testrail4j.gson.model;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;


/**
 * Test Case (Steps) template step
 * 
 */
public class TRStep {

    /**
     * Step value
     * 
     */
    @SerializedName("content")
    @Expose
    private String content;
    /**
     * Step expected result
     * 
     */
    @SerializedName("expected")
    @Expose
    private String expected;
    /**
     * Step actual result
     * 
     */
    @SerializedName("actual")
    @Expose
    private String actual;
    /**
     * The ID of the test step status.
     * 
     */
    @SerializedName("status_id")
    @Expose
    private String statusId;

    /**
     * No args constructor for use in serialization
     * 
     */
    public TRStep() {
    }

    /**
     * 
     * @param actual
     * @param statusId
     * @param expected
     * @param content
     */
    public TRStep(String content, String expected, String actual, String statusId) {
        super();
        this.content = content;
        this.expected = expected;
        this.actual = actual;
        this.statusId = statusId;
    }

    /**
     * Step value
     * 
     */
    public String getContent() {
        return content;
    }

    /**
     * Step value
     * 
     */
    public void setContent(String content) {
        this.content = content;
    }

    public TRStep withContent(String content) {
        this.content = content;
        return this;
    }

    /**
     * Step expected result
     * 
     */
    public String getExpected() {
        return expected;
    }

    /**
     * Step expected result
     * 
     */
    public void setExpected(String expected) {
        this.expected = expected;
    }

    public TRStep withExpected(String expected) {
        this.expected = expected;
        return this;
    }

    /**
     * Step actual result
     * 
     */
    public String getActual() {
        return actual;
    }

    /**
     * Step actual result
     * 
     */
    public void setActual(String actual) {
        this.actual = actual;
    }

    public TRStep withActual(String actual) {
        this.actual = actual;
        return this;
    }

    /**
     * The ID of the test step status.
     * 
     */
    public String getStatusId() {
        return statusId;
    }

    /**
     * The ID of the test step status.
     * 
     */
    public void setStatusId(String statusId) {
        this.statusId = statusId;
    }

    public TRStep withStatusId(String statusId) {
        this.statusId = statusId;
        return this;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(TRStep.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
        sb.append("content");
        sb.append('=');
        sb.append(((this.content == null)?"":this.content));
        sb.append(',');
        sb.append("expected");
        sb.append('=');
        sb.append(((this.expected == null)?"":this.expected));
        sb.append(',');
        sb.append("actual");
        sb.append('=');
        sb.append(((this.actual == null)?"":this.actual));
        sb.append(',');
        sb.append("statusId");
        sb.append('=');
        sb.append(((this.statusId == null)?"":this.statusId));
        sb.append(',');
        if (sb.charAt((sb.length()- 1)) == ',') {
            sb.setCharAt((sb.length()- 1), ']');
        } else {
            sb.append(']');
        }
        return sb.toString();
    }

    @Override
    public int hashCode() {
        int result = 1;
        result = ((result* 31)+((this.actual == null)? 0 :this.actual.hashCode()));
        result = ((result* 31)+((this.statusId == null)? 0 :this.statusId.hashCode()));
        result = ((result* 31)+((this.content == null)? 0 :this.content.hashCode()));
        result = ((result* 31)+((this.expected == null)? 0 :this.expected.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof TRStep) == false) {
            return false;
        }
        TRStep rhs = ((TRStep) other);
        return (((((this.actual == rhs.actual)||((this.actual!= null)&&this.actual.equals(rhs.actual)))&&((this.statusId == rhs.statusId)||((this.statusId!= null)&&this.statusId.equals(rhs.statusId))))&&((this.content == rhs.content)||((this.content!= null)&&this.content.equals(rhs.content))))&&((this.expected == rhs.expected)||((this.expected!= null)&&this.expected.equals(rhs.expected))));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy