net.thucydides.core.matchers.BeanCountMatcher Maven / Gradle / Ivy
package net.thucydides.core.matchers;
import org.hamcrest.Matcher;
import java.util.Collection;
class BeanCountMatcher implements BeanCollectionMatcher {
private final Matcher countMatcher;
public BeanCountMatcher(Matcher countMatcher) {
this.countMatcher = countMatcher;
}
public boolean matches(Collection elements) {
return countMatcher.matches(elements.size());
}
@Override
public String toString() {
return "number of matching entries " + countMatcher;
}
@Override
public boolean matches(Object target) {
return matches((Collection) target);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy