@Test public void shouldReturnGeneratorOfType() { Generator<BigDecimal> bigDecimalGenerator = Generators.ofType(BigDecimal.class, new GeneratorOfInstance<>("10")); assertThat(bigDecimalGenerator.next(), comparesEqualTo(BigDecimal.TEN)); }
public static <T, V> Generator<T> ofType(Class<T> type, Generator<V> valueGenerator) { return new TypeGenerator<>(type, valueGenerator); }
Generators { public static <T, V> Generator<T> ofType(Class<T> type, Generator<V> valueGenerator) { return new TypeGenerator<>(type, valueGenerator); } }
Generators { public static <T, V> Generator<T> ofType(Class<T> type, Generator<V> valueGenerator) { return new TypeGenerator<>(type, valueGenerator); } private  Generators(); }
Generators { public static <T, V> Generator<T> ofType(Class<T> type, Generator<V> valueGenerator) { return new TypeGenerator<>(type, valueGenerator); } private  Generators(); static Generator<Integer> positiveInts(int from, int to); static Generator<Long> positiveLongs(long from, long to); static Generator<T> broadcasting(Generator<T> delegate, List<Consumer<T>> consumers); static Generator<String> alphabetic(int length); static Generator<T> ofInstance(T instance); static Generator<T> ofType(Class<T> type, Generator<V> valueGenerator); static Iterable<T> iterable(int limit, Generator<T> generator); static Generator<T> biased(int percentageBiasTowardsFirst, Generator<T> firstGenerator, Generator<T> secondGenerator); static List<T> listFrom(int limit, Generator<T> generator); static Set<T> setFrom(int limit, Generator<T> generator); static Generator<T> randomEnum(Class<T> enumClass); static Generator<Long> cardNumber(Generator<Long> partialAccountNumberGenerator); static Generator<Integer> nDigitPositiveInteger(int digits); static Generator<T> transform(Generator<F> delegate, Function<F, T> transformation); static Generator<String> upperCase(GeneratorOfInstance<String> delegate, Locale locale); static Generator<String> upperCase(GeneratorOfInstance<String> delegate); static Generator<String> lowerCase(GeneratorOfInstance<String> delegate); static Generator<String> lowerCase(Generator<String> delegate, Locale locale); }
Generators { public static <T, V> Generator<T> ofType(Class<T> type, Generator<V> valueGenerator) { return new TypeGenerator<>(type, valueGenerator); } private  Generators(); static Generator<Integer> positiveInts(int from, int to); static Generator<Long> positiveLongs(long from, long to); static Generator<T> broadcasting(Generator<T> delegate, List<Consumer<T>> consumers); static Generator<String> alphabetic(int length); static Generator<T> ofInstance(T instance); static Generator<T> ofType(Class<T> type, Generator<V> valueGenerator); static Iterable<T> iterable(int limit, Generator<T> generator); static Generator<T> biased(int percentageBiasTowardsFirst, Generator<T> firstGenerator, Generator<T> secondGenerator); static List<T> listFrom(int limit, Generator<T> generator); static Set<T> setFrom(int limit, Generator<T> generator); static Generator<T> randomEnum(Class<T> enumClass); static Generator<Long> cardNumber(Generator<Long> partialAccountNumberGenerator); static Generator<Integer> nDigitPositiveInteger(int digits); static Generator<T> transform(Generator<F> delegate, Function<F, T> transformation); static Generator<String> upperCase(GeneratorOfInstance<String> delegate, Locale locale); static Generator<String> upperCase(GeneratorOfInstance<String> delegate); static Generator<String> lowerCase(GeneratorOfInstance<String> delegate); static Generator<String> lowerCase(Generator<String> delegate, Locale locale); static final Generator<Integer> positiveInts; static final Generator<Long> positiveLongs; static final Generator<String> alphabetic10; }