package com.pturpin.quickcheck.junit4;

import com.pturpin.quickcheck.identifier.ClassIdentifier;
import com.pturpin.quickcheck.registry.Registries;
import com.pturpin.quickcheck.registry.Registry;

import static com.pturpin.quickcheck.generator.Numbers.doubleGen;

/**
 * Created by turpif on 28/04/17.
 */
final class DefaultRegistryFactory implements RandomRunner.RegistryFactory {

  public DefaultRegistryFactory() {
    // nothing
  }

  @Override
  public Registry create() {
    return Registries.builder()
        .put(new ClassIdentifier<>(double.class), doubleGen())
        .put(new ClassIdentifier<>(Double.class), doubleGen())
        .build();
  }
}

@@ -33,16 +33,108 @@
 unit4;%0A%0A
+import com.pturpin.quickcheck.base.Ranges;%0Aimport com.pturpin.quickcheck.base.Ranges.Range;%0A
 import c
@@ -284,16 +284,75 @@
 istry;%0A%0A
+import java.math.BigDecimal;%0Aimport java.math.BigInteger;%0A%0A
 import s
@@ -398,25 +398,17 @@
 Numbers.
-doubleGen
+*
 ;%0A%0A/**%0A 
@@ -627,159 +627,1010 @@
     
-return Registries.builder()%0A        .put(new ClassIdentifier%3C%3E(double.class), doubleGen())%0A        .put(new ClassIdentifier%3C%3E(Double.class), doubleGen(
+Range%3CBigInteger%3E bigIntegerRange = Ranges.closed(%0A        BigInteger.valueOf(Long.MIN_VALUE).multiply(BigInteger.valueOf(1000)),%0A        BigInteger.valueOf(Long.MIN_VALUE).multiply(BigInteger.valueOf(1000)));%0A%0A    Range%3CBigDecimal%3E bigDecimalRange = Ranges.closed(%0A        BigDecimal.valueOf(-Double.MAX_VALUE).multiply(BigDecimal.valueOf(1000)),%0A        BigDecimal.valueOf(Double.MIN_VALUE).multiply(BigDecimal.valueOf(1000)));%0A%0A    return Registries.builder()%0A        .put(new ClassIdentifier%3C%3E(double.class), doubleGen())%0A        .put(new ClassIdentifier%3C%3E(Double.class), doubleGen())%0A        .put(new ClassIdentifier%3C%3E(int.class), integerGen())%0A        .put(new ClassIdentifier%3C%3E(Integer.class), integerGen())%0A        .put(new ClassIdentifier%3C%3E(long.class), longGen())%0A        .put(new ClassIdentifier%3C%3E(Long.class), longGen())%0A        .put(new ClassIdentifier%3C%3E(BigInteger.class), bigIntegerGen(bigIntegerRange))%0A        .put(new ClassIdentifier%3C%3E(BigDecimal.class), bigDecimalGen(bigDecimalRange
 ))%0A 

Complete default registry with promitive generators