Created
May 16, 2014 06:55
-
-
Save adinauer/d7d5f5794d6ae95c8252 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
${is:importStatic( | |
org.hamcrest.Matchers.equalTo | |
)} | |
${:import( | |
org.hamcrest.Matcher, | |
org.hamcrest.FeatureMatcher | |
)} | |
public static Matcher<${type_to_match}> ${custom_matcher_name}(${type_of_expected_value} ${expected_value:expected}) { | |
return new FeatureMatcher<${type_to_match}, ${type_of_expected_value}>(equalTo(${expected_value}), "${expected_message} ", "${field_name}") { | |
@Override | |
protected ${type_of_expected_value} featureValueOf(${type_to_match} actual) { | |
return actual.${cursor}; | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment