The simple, stupid random Java beans/records generator
This release is the same as v4.3.0 except the removal of deprecated APIs. It is a major version upgrade as it requires Java 11 as a minimum Java version. The main reason for this major version upgrade is that Easy Random v5 will be the last feature release of the project which is going to be in maintenance mode from now on.
As mentioned above, v5 should be a drop-in replacement of v4.3 as long as you use Java 11 instead of Java 8. The following deprecated APIs have been removed in v5.0:
org.jeasy.random.util.DateUtils
org.jeasy.random.util.CollectionUtils
aNewXXXRandomzier
). Use the equivalent constructors instead.This release is the last version of the 4.x line. The next release will be v5.0 and will be based on Java 11. This release comes with the following new features, enhancements and bug fixes:
EnumSet
NanoSecondRandomizer
ObjenesisObjectFactory
publicLocalTimeRangeRandomizer
and LocalDateTimeRangeRandomizer
ContextAwareRandomizer
Option<Object>
instead of actual Option<T>
Many thanks to all contributors who helped in making this release possible!
This is a minor release which comes with the following enhancements and bug fixes:
IllegalArgumentException
I would like to thank @mjureczko, @arnzel, @elexx, @LeJeanbono, @stevenvanophem and @rcsilva83 for their feedback and contributions to this release!
This is a minor release with the following changes:
BigDecimalRandomizer
BigDecimalRangeRandomizer
FieldPredicates
AnnotationRandomizerRegistry
should cache and reuse randomizers to improve performanceDurationRandomizer
LocalDateTimeRangeRandomizer
Min-Max Exception due time of dayRandomizerContext
Many thanks to all contributors for making this happen!
This is the first release of Easy Random v4. It fixes a couple of issues that were reported against v4.0.0.RC1:
Thanks to @peter721 and @magx2 for reporting these bugs.
Major changes in the v4 line have been described in details in the change log of v4.0.0.RC1.
If you have any question, please do not hesitate to open an issue or join the gitter channel of the project.
This major release fixes a couple of design issues that have been reported against v3. Random Beans used to provide several configuration options in preference to strategy interfaces allowing the user to customize key behaviours. This has been fixed in this major version. Three strategy interfaces have been introduced allowing to customize the internal behaviour of the randomization process:
ExclusionPolicy
: Strategy interface for field/type exclusion (See #349)ObjectFactory
: Strategy interface for object creation (See #341)RandomizerProvider
: Strategy interface to provide randomizers for field/type (See #350)Custom implementations can be provided through the newly added EasyRandomParameters
API:
EasyRandomParameters parameters = new EasyRandomParameters()
.objectFactory(new MyObjectFactory())
.exclusionPolicy(new MyExclusionPolicy())
.randomizerProvider(new MyRandomizerProvider());
EasyRandom easyRandom = new EasyRandom(parameters);
io.github.benas
to org.jeasy
groupId
of the project has been changed to org.jeasy
artifactId
random-beans
has been renamed to easy-random-core
artifactId
random-beans-validation
has been renamed to easy-random-bean-validation
artifactId
random-beans-randomizers
has been renamed to easy-random-randomizers
io.github.benas.randombeans.api.EnhancedRandom
class has been renamed to org.jeasy.random.EasyRandom
EnhancedRandomParameters
has been renamed to EasyRandomParameters
EnhancedRandomBuilder
has been removed in favor of the fluent EasyRandomParameters
APIio.github.benas.randombeans.util.Constants
class has been removed and all parameter default values are now defined in EasyRandomParameters
io.github.benas.randombeans.util.Range
class has been moved as an inner class of EasyRandomParameters
EasyRandom#nextObject
method have been removed. Field exclusion must be defined through EasyRandomParameters
RandomizerContext#getType
has been renamed to RandomizerContext#getTargetType
RandomizerContext#getRandomizationDepth
has been renamed to RandomizerContext#getCurrentRandomizationDepth
If you have any problem, please do not hesitate to open an issue and I would love to help!
I would like to thank all contributors for their help moving the project forward and making it better release after release!
This release is a drop in replacement for v3.8.0 and includes the following changes:
ContextAwareRandomizer
interfaceSupplier
to a Randomizer
FieldPredicates
TypePredicates
ignoreRandomizationErrors
to silently ignore randomization errorsjava.time
typesZonedDateTime
type is not randomized in the specified date/time rangeEnhancedRandomBuilder.registerRandomizerRegistry
to EnhancedRandomBuilder.randomizerRegistry
. The former is deprecated and will be removed in the next major versionFieldDefinition
in favor of predicate combination.Many thanks to @eric-taix, @kkurczewski, @neetkee, @weronika-redlarska and @PascalSchumacher for their contributions to this release!
❗️ Please note that v3.9.0 is the last release in the v3 line.
This is a minor release and probably the last one in the v3.x line. It can be a drop-in replacement for v3.7.0. The main changes are:
Many thanks to @ Spikhalskiy, @ashbike, @tnmtechnologies, @aewhite, @AVE-cesar, @Redid, @magx2, @aabashkin, @DeGuitard, @chintebay, @aeneal, @avillev and @marcovb279 for reporting bugs, testing fixes and suggesting features! Special BIG thanks to @PascalSchumacher for his continuous amazing work on Random Beans. I'm really grateful to all of you!
This is a minor release and can be a drop-in replacement of v3.6. Here are the main changes introduced in this version:
We would like to thank @murphd40 , @sparty02 , @VanOvermeire , @pgaschuetz and @huningd for their contributions to this release. A big thank goes to @PascalSchumacher for his amazing work on random beans!
This is a minor release with the following additions:
BigDecimal
scaleIntegerRangeRandomizer
does not generate random values in the given rangeRandomizerProxy
fails to create the proxy when the Supplier
is specified as lambdaMany thanks to @euZebe , @petromir , @devoto13 and @LucasAndersson for their valuable contributions to this release!
A special big thank goes to @PascalSchumacher for his excellent active work on random beans.