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

at.willhaben.willtest.proxy.assertions.AbstractRequestAssertion Maven / Gradle / Ivy

There is a newer version: 3.1.10
Show newest version
package at.willhaben.willtest.proxy.assertions;

import org.hamcrest.TypeSafeMatcher;

import java.util.Collection;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;

public abstract class AbstractRequestAssertion extends TypeSafeMatcher {

    public  boolean oneOrMoreMatch(Collection list, Predicate filterMethod) {
        List filteredEntries = list.stream()
                .filter(filterMethod)
                .collect(Collectors.toList());
        return filteredEntries.size() > 0;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy