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

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

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

import org.hamcrest.Description;

import java.util.Collection;

public class RequestAvailableAssertion extends AbstractRequestAssertion> {

    private String regexMatch;

    public RequestAvailableAssertion(String regexMatch) {
        this.regexMatch = regexMatch;
    }

    @Override
    protected boolean matchesSafely(Collection urls) {
        return oneOrMoreMatch(urls, url -> url.matches(regexMatch));
    }

    @Override
    public void describeTo(Description description) {
        description.appendText("url which matches the given regex ").appendValue(regexMatch);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy