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

com.griddynamics.qa.datapool.matchers.IsMatcher Maven / Gradle / Ivy

Go to download

Test Data Pool tool is intended to mitigate risks of running automated tests against multiple unstable “FullDB” environments having unpredictable set of data.

The newest version!
package com.griddynamics.qa.datapool.matchers;

import com.griddynamics.qa.datapool.datatype.IDataType;
import com.griddynamics.qa.datapool.IMatcher;

import java.util.function.Predicate;

/**
 * @author Alexey Lyanguzov.
 */
class IsMatcher implements IMatcher {
    @Override @SuppressWarnings("all")
    public Predicate getMatcher(String propName, Object value) {
        return (o) -> {
            Object prop = o.get(propName, Object.class);
            if(prop == null && value != null) return false;
            if(prop == null && value == null) return true;
            return prop.equals(value);
        };
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy