qala-io / datagen

Java lib that generates random data (numbers, strings, dates) - mostly to facilitate Randomized Testing.
http://qala.io/blog/randomized-testing.html
Apache License 2.0
60 stars 5 forks source link

Consider moving example of nullOr() to a dedicated section #8

Closed php-coder closed 7 years ago

php-coder commented 7 years ago

Example of nullOr("string") that is returning "string" looks weird in Collections/Arrays section. My first impression was that it should be in the section about strings.

I suggest to 1) add example for nullOr("string") to the section about strings (for completeness) 2) remove this example from the Collections/Arrays section 3) introduce a dedicated section for nullOr() with different examples (to demonstrate that it uses generics and may accepts any types, not only strings)

ctapobep commented 7 years ago

Removed completely these examples in Strings and moved it all together into a new section. BTW, nullOr() doesn't necessarily work with Strings (added example for this too).

Thanks!