Configuration { public static Strategy systemStrategy() { return new Strategy(defaultPRNG(pickSeed()), pickExamples(), pickTestingTimeMillis(), pickShrinks(), pickAttempts(), new ExceptionReporter(), pickGuidance()); }  static Strategy initialStrategy(Class<?> testClass); static Strategy profileStrategy(Class<?> testClass, String profile); static Strategy defaultStrategy(Class<?> testClass); static Strategy systemStrategy(); static PseudoRandom defaultPRNG(long seed); static Class<T> ensureLoaded(Class<T> klass); final static String PROFILE; final static String SEED; final static String EXAMPLES; final static String SHRINKS; final static String TESTING_TIME; final static String GENERATE_ATTEMPTS; }
@Test public void shouldUseSeedFromSystemProperty() { System.setProperty("QT_SEED", "42"); assertThat(Configuration.systemStrategy().prng().getInitialSeed()) .isEqualTo(42); }
@Test public void shouldUseNumberOfExamplesFromSystemProperty() { System.setProperty("QT_EXAMPLES", "13"); assertThat(Configuration.systemStrategy().examples()).isEqualTo(13); }
@Test public void shouldUseNumberOfShrinkCyclesFromSystemProperty() { System.setProperty("QT_SHRINKS", "7"); assertThat(Configuration.systemStrategy().shrinkCycles()).isEqualTo(7); }
@Test public void shouldDefaultShrinkCyclesTo100TimesTheNumberOfExamples() { System.setProperty("QT_EXAMPLES", "500"); assertThat(Configuration.systemStrategy().shrinkCycles()) .isEqualTo(500 * 100); }