Skip to content

Commit

Permalink
Merge b7aaa9e into bffe8be
Browse files Browse the repository at this point in the history
  • Loading branch information
lanwen committed Feb 1, 2017
2 parents bffe8be + b7aaa9e commit 7c815d4
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import org.hamcrest.Description;
import org.hamcrest.Factory;
import org.hamcrest.FeatureMatcher;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeDiagnosingMatcher;
import ru.lanwen.diff.uri.UriDiffer;
import ru.lanwen.diff.uri.core.UriDiff;
Expand Down Expand Up @@ -62,4 +64,14 @@ public SameAsURIMatcher filteredWith(UriDiffFilter... filters) {
public static SameAsURIMatcher sameAsURI(URI expectedUri) {
return new SameAsURIMatcher(expectedUri);
}

@Factory
public static Matcher<String> sameAsURI(String expectedUri) {
return new FeatureMatcher<String, URI>(sameAsURI(URI.create(expectedUri)), "as string", "as string") {
@Override
protected URI featureValueOf(String s) {
return URI.create(s);
}
};
}
}

0 comments on commit 7c815d4

Please sign in to comment.