SourceDSL { public static LongsDSL longs() { return new LongsDSL(); }  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();  }
@Test public void shouldGenerateLongMaxAndMin() { Gen<Long> testee = longs().all(); assertThatGenerator(testee).generatesTheMinAndMax(Long.MIN_VALUE, Long.MAX_VALUE); }
@Test public void shouldGenerateLongStartAndEndInclusive() { Gen<Long> testee = longs().from(-87078).upToAndIncluding(8706); assertThatGenerator(testee).generatesTheMinAndMax(-87078L, 8706L); }
@Test public void shouldGenerateLongStartAndEndExclusive() { Gen<Long> testee = longs().from(-87078).upTo(8706); assertThatGenerator(testee).generatesTheMinAndMax(-87078L, 8705L); }
@Test public void shouldGenerateLongsBetween() { Gen<Long> testee = longs().between(-87078, 8706); assertThatGenerator(testee).generatesTheMinAndMax(-87078L, 8706L); }
@SuppressWarnings("unused") @Test public void shouldThrowErrorWhenCreatingAnExclusiveLongIntervalWithMaxLessThanMin() { try { Gen<Long> testee = longs().from(-5).upTo(-5); fail("Created a long generator where max is less than min!"); } catch (IllegalArgumentException expected) { } }
@SuppressWarnings("unused") @Test public void shouldNotCatchWhenCreatingAnExclusiveLongIntervalWithMaxOneMoreThanMin() { try { Gen<Long> testee = longs().from(-5).upTo(-4); } catch (IllegalArgumentException expected) { fail("Threw an exception for an acceptable interval!"); } }
@SuppressWarnings("unused") @Test public void shouldThrowErrorWhenCreatingAnInclusiveLongIntervalWithMaxLessThanMin() { try { Gen<Long> testee = longs().from(-5).upToAndIncluding(-6); fail("Created a long generator where max is less than min!"); } catch (IllegalArgumentException expected) { } }
@SuppressWarnings("unused") @Test public void shouldNotCatchWhenCreatingAnInclusiveLongIntervalWithMaxEqualToMin() { try { Gen<Long> testee = longs().from(-5).upToAndIncluding(-5); } catch (IllegalArgumentException expected) { fail("Threw an exception for an acceptable interval!"); } }
@SuppressWarnings("unused") @Test public void shouldThrowErrorWhenCreatingAnInclusiveLongIntervalWithBetweenWithMaxLessThanMin() { try { Gen<Long> testee = longs().between(-5, -6); fail("Created a long generator where max is less than min!"); } catch (IllegalArgumentException expected) { } }
@SuppressWarnings("unused") @Test public void shouldNotCatchWhenCreatingAnInclusiveLongIntervalWithBetweenWithMaxEqualToMin() { try { Gen<Long> testee = longs().between(-5, -5); } catch (IllegalArgumentException expected) { fail("Threw an exception for an acceptable interval!"); } }