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

net.thucydides.core.matchers.InstantiatedBeanMatcher Maven / Gradle / Ivy

There is a newer version: 4.2.1
Show newest version
package net.thucydides.core.matchers;

import org.hamcrest.Description;
import org.hamcrest.TypeSafeMatcher;

class InstantiatedBeanMatcher extends TypeSafeMatcher {

    private final BeanPropertyMatcher propertyMatcher;

    public InstantiatedBeanMatcher(final BeanPropertyMatcher propertyMatcher) {
        this.propertyMatcher = propertyMatcher;
    }

    @Override
    public boolean matchesSafely(Object bean) {
        return propertyMatcher.matches(bean);
    }

    @Override
    public void describeTo(Description description) {
        description.appendText(propertyMatcher.toString());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy