@Test void generatedYearShouldBeWithinSpecifiedRange() { assertThat(randomizer.getRandomValue()).isBetween(minYear, maxYear); }
@Override public Year getRandomValue() { long minYear = min.getLong(ChronoField.YEAR); long maxYear = max.getLong(ChronoField.YEAR); long randomYear = (long) nextDouble(minYear, maxYear); return Year.of(Math.toIntExact(randomYear)); }
YearRangeRandomizer extends AbstractRangeRandomizer<Year> { @Override public Year getRandomValue() { long minYear = min.getLong(ChronoField.YEAR); long maxYear = max.getLong(ChronoField.YEAR); long randomYear = (long) nextDouble(minYear, maxYear); return Year.of(Math.toIntExact(randomYear)); } }
YearRangeRandomizer extends AbstractRangeRandomizer<Year> { @Override public Year getRandomValue() { long minYear = min.getLong(ChronoField.YEAR); long maxYear = max.getLong(ChronoField.YEAR); long randomYear = (long) nextDouble(minYear, maxYear); return Year.of(Math.toIntExact(randomYear)); } YearRangeRandomizer(final Year min, final Year max);  YearRangeRandomizer(final Year min, final Year max, final long seed); }
YearRangeRandomizer extends AbstractRangeRandomizer<Year> { @Override public Year getRandomValue() { long minYear = min.getLong(ChronoField.YEAR); long maxYear = max.getLong(ChronoField.YEAR); long randomYear = (long) nextDouble(minYear, maxYear); return Year.of(Math.toIntExact(randomYear)); } YearRangeRandomizer(final Year min, final Year max);  YearRangeRandomizer(final Year min, final Year max, final long seed); static YearRangeRandomizer aNewYearRangeRandomizer(final Year min, final Year max); static YearRangeRandomizer aNewYearRangeRandomizer(final Year min, final Year max, final long seed); @Override Year getRandomValue(); }
YearRangeRandomizer extends AbstractRangeRandomizer<Year> { @Override public Year getRandomValue() { long minYear = min.getLong(ChronoField.YEAR); long maxYear = max.getLong(ChronoField.YEAR); long randomYear = (long) nextDouble(minYear, maxYear); return Year.of(Math.toIntExact(randomYear)); } YearRangeRandomizer(final Year min, final Year max);  YearRangeRandomizer(final Year min, final Year max, final long seed); static YearRangeRandomizer aNewYearRangeRandomizer(final Year min, final Year max); static YearRangeRandomizer aNewYearRangeRandomizer(final Year min, final Year max, final long seed); @Override Year getRandomValue();  }