diff src/test/java/fj/data/test/PropertyAssert.java @ 0:fe80c1edf1be

add getLoop
author tatsuki
date Fri, 20 Mar 2015 21:04:03 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/test/java/fj/data/test/PropertyAssert.java	Fri Mar 20 21:04:03 2015 +0900
@@ -0,0 +1,20 @@
+package fj.data.test;
+
+import fj.Unit;
+import fj.test.CheckResult;
+import fj.test.Property;
+import org.junit.Assert;
+
+/**
+ * Created by MarkPerry on 18/12/2014.
+ */
+public class PropertyAssert {
+
+    public static Unit assertResult(Property p) {
+        CheckResult cr = p.check();
+        CheckResult.summary.println(cr);
+        Assert.assertTrue(cr.isExhausted() || cr.isPassed() || cr.isProven());
+        return Unit.unit();
+    }
+
+}