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

com.smartbear.readyapi.client.Validator 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;

import org.apache.commons.lang3.StringUtils;

import java.util.List;

public class Validator {
    public static void validateNotEmpty(String value, String message) {
        if (StringUtils.isBlank(value)) {
            throw new IllegalStateException(message);
        }
    }

    public static void validateNotEmpty(Integer value, String message) {
        if (value == null) {
            throw new IllegalStateException(message);
        }
    }

    public static void validateNotEmpty(List values, String message) {
        if (values.size() == 0) {
            throw new IllegalStateException(message);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy