Index: test/core_matchers_test.dart |
diff --git a/test/core_matchers_test.dart b/test/core_matchers_test.dart |
index 3213455472331ae9861530ce0503e2c93a5f36d7..5d8a194177339ed5432aa02b58e8d470d56db48b 100644 |
--- a/test/core_matchers_test.dart |
+++ b/test/core_matchers_test.dart |
@@ -187,4 +187,16 @@ void main() { |
shouldPass('cow', predicate((x) => x is String, "an instance of String")); |
}); |
}); |
+ |
+ test("Feature Matcher", () { |
+ var w = new Widget(); |
+ w.price = 10; |
+ shouldPass(w, new HasPrice(10)); |
+ shouldPass(w, new HasPrice(greaterThan(0))); |
+ shouldFail(w, new HasPrice(greaterThan(10)), |
+ "Expected: Widget with a price that is a value greater than <10> " |
+ "Actual: <Instance of 'Widget'> " |
+ "Which: has price with value <10> which is not " |
+ "a value greater than <10>"); |
+ }); |
} |