Changeset 8857 in josm for trunk/test/unit/org/CustomMatchers.java
- Timestamp:
- 2015-10-11T17:28:19+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/CustomMatchers.java
r8759 r8857 14 14 import org.openstreetmap.josm.tools.Predicate; 15 15 16 /** 17 * Custom matchers for unit tests. 18 */ 16 19 @Ignore("no test") 17 20 public final class CustomMatchers { … … 21 24 } 22 25 26 /** 27 * Matcher for a predicate. 28 * @param predicate the predicate 29 * @return matcher for a predicate 30 */ 23 31 public static <T> Matcher<? extends T> forPredicate(final Predicate<T> predicate) { 24 32 return new TypeSafeMatcher<T>() { … … 36 44 } 37 45 46 /** 47 * Matcher for a collection of a given size. 48 * @param size of collection 49 * @return matcher for a collection of a given size 50 */ 38 51 public static Matcher<Collection<?>> hasSize(final int size) { 39 52 return new TypeSafeMatcher<Collection<?>>() { … … 50 63 } 51 64 65 /** 66 * Matcher for an empty collection. 67 * @return matcher for an empty collection 68 */ 52 69 public static Matcher<Collection<?>> isEmpty() { 53 70 return new TypeSafeMatcher<Collection<?>>() { … … 64 81 } 65 82 83 /** 84 * Matcher for a point at a given location. 85 * @param expected expected location 86 * @return matcher for a point at a given location 87 */ 66 88 public static Matcher<? super Point2D> is(final Point2D expected) { 67 89 return new CustomTypeSafeMatcher<Point2D>("the same Point2D") { … … 73 95 } 74 96 97 /** 98 * Matcher for a point at a given location. 99 * @param expected expected location 100 * @return matcher for a point at a given location 101 */ 75 102 public static Matcher<? super LatLon> is(final LatLon expected) { 76 103 return new CustomTypeSafeMatcher<LatLon>("the same LatLon") { … … 83 110 } 84 111 112 /** 113 * Matcher for a point at a given location. 114 * @param expected expected location 115 * @return matcher for a point at a given location 116 */ 85 117 public static Matcher<? super EastNorth> is(final EastNorth expected) { 86 118 return new CustomTypeSafeMatcher<EastNorth>("the same EastNorth") { … … 92 124 }; 93 125 } 94 95 126 }
Note:
See TracChangeset
for help on using the changeset viewer.