SourceDSL { public static BigDecimalsDSL bigDecimals() { return new BigDecimalsDSL(); }  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 shouldReportUsefulErrorWhenAttemptingToCreateBigDecimalOfNegativeNumberOfBytes() { try { Gen<BigDecimal> testee = bigDecimals().ofBytes(0).withScale(2); fail("Created an BigDecimal 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 shouldCreateABigDecimalsWithOneByte() { try { Gen<BigDecimal> testee = bigDecimals().ofBytes(1).withScale(2); } catch (IllegalArgumentException expected) { fail("Threw an exception for an acceptable input!"); } }