Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  The MIT License
  Copyright (c) 2010-2014 Paul R. Holser, Jr.
  Permission is hereby granted, free of charge, to any person obtaining
  a copy of this software and associated documentation files (the
  "Software"), to deal in the Software without restriction, including
  without limitation the rights to use, copy, modify, merge, publish,
 distribute, sublicense, and/or sell copies of the Software, and to
 permit persons to whom the Software is furnished to do so, subject to
 the following conditions:
 The above copyright notice and this permission notice shall be
 included in all copies or substantial portions of the Software.
package com.pholser.junit.quickcheck;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;

Mark a parameter of a Theory method with this annotation to have random values supplied to it.
public @interface ForAll {

the number of generated values to give the annotated theory parameter
    int sampleSize() default 100;


the ratio of discarded generated values to successful generated values above which values will no longer be generated. For a negative value, generation will cease immediately. For a zero value, generation will stop if the number of discarded generated values exceeds the sample size.
    int discardRatio() default 0;
New to GrepCode? Check out our FAQ X