sockeqwe / Instantiator

Tired of manually setup test data of Kotlin data classes or POJOs? Instantiator creates Instances of any class for you so that you can focus on writing tests instead of spending time and effort to setup test data
Apache License 2.0
60 stars 4 forks source link

Make number of items to fill configurable #5

Open cameronjump opened 2 days ago

cameronjump commented 2 days ago

What was added?

Made number of items to fill configurable, e.g InstantiatorConfig(numberOfItemsToFull = 3)

Why?

Being able to configure this value gives flexibility to instantiate models more specific to different use cases.

Also, in our cases we use this library to instantiate generated network models written by our API team. These models sometimes have multiple layers of nested lists and are taking up too much memory in our unit test environment.