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

com.smartbear.readyapi.client.assertions.JdbcTimeoutAssertionBuilder Maven / Gradle / Ivy

Go to download

Java client library for creating and executing test recipes against Ready!API TestServer

There is a newer version: 1.2.1
Show newest version
package com.smartbear.readyapi.client.assertions;

import com.smartbear.readyapi.client.model.JdbcTimeoutAssertion;

import java.util.Objects;

public class JdbcTimeoutAssertionBuilder extends AbstractAssertionBuilder {

    private final Object timeout;

    public JdbcTimeoutAssertionBuilder(long timeout) {
        this.timeout = timeout;
    }

    public JdbcTimeoutAssertionBuilder(String timeout) {
        Objects.requireNonNull(timeout);
        this.timeout = timeout;
    }

    @Override
    public JdbcTimeoutAssertion build() {
        JdbcTimeoutAssertion timeoutAssertion = new JdbcTimeoutAssertion();
        timeoutAssertion.setTimeout(String.valueOf(timeout));
        timeoutAssertion.setType(Assertions.JDBC_TIMEOUT_TYPE);
        return timeoutAssertion;
    }

    public final static JdbcTimeoutAssertion create(){
        JdbcTimeoutAssertion assertion = new JdbcTimeoutAssertion();
        assertion.setType(Assertions.JDBC_TIMEOUT_TYPE);
        return assertion;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy