SourceDSL { public static BigIntegersDSL bigIntegers() { return new BigIntegersDSL(); }  static LongsDSL longs(); static IntegersDSL integers(); static DoublesDSL doubles(); static FloatsDSL floats(); static CharactersDSL characters(); static StringsDSL strings(); static ListsDSL lists(); static MapsDSL maps(); static ArraysDSL arrays(); static BigIntegersDSL bigIntegers(); static BigDecimalsDSL bigDecimals(); static ArbitraryDSL arbitrary(); static DatesDSL dates(); static LocalDatesDSL localDates(); static BooleansDSL booleans();  }
@SuppressWarnings("unused") @Test public void shouldReportUsefulErrorWhenAttemptingToCreate0LengthBigInteger() { try { Gen<BigInteger> testee = bigIntegers().ofBytes(0); fail("Created an BigInteger generator with improper length byte array!"); } catch (IllegalArgumentException expected) { assertTrue( "Expected exception message to relate to negative length byte array", expected.getMessage() .indexOf( "The length of this array cannot be less than one") >= 0); } }
@SuppressWarnings("unused") @Test public void shouldCreateABigIntegersWithOneByte() { try { Gen<BigInteger> testee = bigIntegers().ofBytes(1); } catch (IllegalArgumentException expected) { fail("Threw an exception for an acceptable input!"); } }