The simple, stupid random Java beans/records generator
This is a minor release with the following changes:
collectionSizeRange
parameterstringLengthRange
parametermaxObjectPoolSize
parameter in EnhancedRandomFactoryBean
maxRandomizationDepth
parameter in EnhancedRandomFactoryBean
StringRandomizer
never returns Strings of maxStringLength
maxObjectPoolSize
to objectPoolSize
maxRandomizationDepth
to randomizationDepth
minCollectionSize
and maxCollectionSize
parameters have been deprecated in favour of collectionSizeRange
minStringLength
and maxStringLength
parameters have been deprecated in favour of stringLengthRange
Many thanks to @enedzvetsky, @dermoritz and @kermit-the-frog for testing and reporting issues. A big thank to @PascalSchumacher for his active contributions to random beans!
This is a minor release with new features and bug fixes. A special thank to @PascalSchumacher and @sansherbina for their contributions to this release!
Here is the complete change log:
maxRandomizationDepth
parameterClassCastException
on wildcard generics in collectionsMapPopulator
doesn't support java.util.EnumMap
TreeMap
, ConcurrentHashMap
, ConcurrentSkipListMap
A special thank to @PascalSchumacher for his amazing contributions to Random Beans! Many thanks to other contributors (@alimohebbi , @MarvinWyrich, @vanhove, @mikemaaaa, @oyxiaogua, @pmaciocia, @rodriguealcazar) for reporting bugs, requesting features and reviewing code. Open source community is really wonderful 😄
v3.3 is a minor release with new features, bug fixes and enhancements. It can be used as a drop-in replacement of v3.2 . Here is the complete change log:
EnhancedRandomBuilder#exclude(Class... types)
FieldDefinition
should be more flexible@Pattern
to generate random strings that match a regexoverrideDefaultInitialization
parameterZonedDateTimeRangeRandomizer
JodaTimeDateTimeRangeRandomizer(Date min, Date max, long seed)
, JodaTimeLocalDateRangeRandomizer(Date min, Date max, long seed)
and JodaTimeLocalDateTimeRangeRandomizer(Date min, Date max, long seed)
This new release brings new features, improvements and bug fixes. Many thanks to all contributors for suggesting ideas, testing snapshot versions and filing bugs!
maxCollectionSize
parametermaxStringLength
parametercharset
parameterdateRange
parametertimeRange
parameterrandom(Class, int, String...)
in EnhancedRandom
randomStreamOf(Class, int, String...)
in EnhancedRandom
randomListOf(Class, int, String...)
in EnhancedRandom
randomSetOf(Class, int, String...)
in EnhancedRandom
randomCollectionOf(Class, int, String...)
in EnhancedRandom
@RandomizerArgument
annotation@Randomizer
java.time.Instant
from being randomizedStringRandomizer
should generate strings with random lengthA special thanks to @PascalSchumacher for his amazing contributions to this release! Pascal has added features, fixed bugs and tremendously improved the code quality. This guy is awesome 👍 Many thanks to all others contributors who reported bugs, requested features and tested snapshot versions.
random-beans-java8
has been merged into the core module random-beans
(#88)#28: add ability to use Java 8 Supplier
as randomizer
#41: add support for Java 8 Date and Time API (JSR 310) types
#118: Allow more controll over generated values
#102: Added more randomizers: LocaleRandomizer
, UUIDRandomizer
, GregorianCalendarRandomizer
, TimeZoneRandomizer
, RegularExpressionRandomizer
#124: Integrate Lombok to reduce boilerplate code
#78: Make the constructor of EnhancedRandomBuilder
public
#82: Add support to register a Randomizer
for a given type
#112: Add Spring support to register a custom randomizer for a given type
#116: Add static factory method to generate random beans with default configuration parameters
#117: rename nextObjects
method into objects
to conform with the standard java.util.Random
API naming pattern
#120: Merge StringLengthRandomizer
and StringRandomizer
#110: Merge NameRandomizer
and FullNameRandomzier
#84: "Pre-initialized" Bean Fields are nulled #86: Exception if java-faker does not support default locale #113: Empty first Collection when no seed is provided #121 User defined Collection/Map types are not populated
jPopulator
to Random Beans
Populator
interface has been renamed to EnhancedRandom
PopulatorBuilder
class has been renamed to EnhancedRandomBuilder
Populator.populateBean(Class type)
method has been renamed to EnhancedRandom.nextObject(Class type)
RandomizerRegistry
API as a SPI to register custom randomizers@Randomizer
annotationSkipRandomizer
APIMapRandomizer
StackOverflowError
when a field is of the same type as declaring class (infinite recursion)ObjectGenerationException
when unable to randomize a field instead of silently ignoring it