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

com.fitbur.mockito.internal.hamcrest.HamcrestArgumentMatcher Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.fitbur.mockito.internal.hamcrest;

import org.hamcrest.Matcher;
import org.hamcrest.StringDescription;
import com.fitbur.mockito.ArgumentMatcher;

/**
 * Created by sfaber on 6/22/15.
 */
public class HamcrestArgumentMatcher implements ArgumentMatcher {

    private final Matcher matcher;

    public  HamcrestArgumentMatcher(Matcher matcher) {
        this.matcher = matcher;
    }

    public boolean matches(Object argument) {
        return this.matcher.matches(argument);
    }

    public String toString() {
        //TODO SF add unit tests and integ test coverage for describeTo()
        return StringDescription.toString(matcher);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy