at.willhaben.willtest.proxy.assertions.RequestAvailableAssertion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Core classes with as few dependencies as possible
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