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

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

Go to download

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

The newest version!
package com.smartbear.readyapi.client.assertions;

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

import static com.smartbear.readyapi.client.Validator.validateNotEmpty;

public class NotContainsAssertionBuilder extends DefaultContainsAssertionBuilder {

    public NotContainsAssertionBuilder(String token) {
        super(token);
    }

    @Override
    public SimpleContainsAssertion build() {
        validateNotEmpty(containsAssertion.getToken(), "Missing token, it's a mandatory parameter for NotContainsAssertion");
        containsAssertion.setType(Assertions.NOT_CONTAINS_TYPE);
        return containsAssertion;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy