view 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 source

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();
    }

}