Class JUnitQuickcheck
java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
com.pholser.junit.quickcheck.runner.JUnitQuickcheck
- All Implemented Interfaces:
org.junit.runner.Describable,org.junit.runner.manipulation.Filterable,org.junit.runner.manipulation.Orderable,org.junit.runner.manipulation.Sortable
public class JUnitQuickcheck
extends org.junit.runners.BlockJUnit4ClassRunner
JUnit test runner for junit-quickcheck property-based tests.
When this runner runs a given test class, it regards only
public instance methods with a return type of void that are
marked with either the Property
annotation or the org.junit.Test annotation.
This runner honors Rule, Before,
After, BeforeClass, and
AfterClass. Their execution is wrapped around the
verification of a property or execution of a test in the expected
order.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GeometricDistributionprivate final org.slf4j.Loggerprivate final GeneratorRepository -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.junit.runners.model.FrameworkMethod>org.junit.runners.model.StatementmethodBlock(org.junit.runners.model.FrameworkMethod method) private voidvalidatePropertyMethods(List<Throwable> errors) protected voidvalidateTestMethods(List<Throwable> errors) Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, createTest, createTest, describeChild, getChildren, getTestRules, isIgnored, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeoutMethods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolationMethods inherited from class org.junit.runner.Runner
testCount
-
Field Details
-
repo
-
distro
-
logger
private final org.slf4j.Logger logger
-
-
Constructor Details
-
JUnitQuickcheck
Invoked reflectively by JUnit.- Parameters:
clazz- class containing properties to verify- Throws:
org.junit.runners.model.InitializationError- if there is a problem with the properties class
-
-
Method Details
-
validateTestMethods
- Overrides:
validateTestMethodsin classorg.junit.runners.BlockJUnit4ClassRunner
-
validatePropertyMethods
-
computeTestMethods
- Overrides:
computeTestMethodsin classorg.junit.runners.BlockJUnit4ClassRunner
-
methodBlock
public org.junit.runners.model.Statement methodBlock(org.junit.runners.model.FrameworkMethod method) - Overrides:
methodBlockin classorg.junit.runners.BlockJUnit4ClassRunner
-