naver / fixture-monkey

Let Fixture Monkey generate test instances including edge cases automatically
https://naver.github.io/fixture-monkey
Apache License 2.0
560 stars 89 forks source link

Add 'InnerSpec.keys()' Method with Collection Parameter Support #934

Closed songkg7 closed 7 months ago

songkg7 commented 7 months ago

Summary

Supports collection type as a parameter to InnerSpec.keys(), and a few other method like this.

related: resolve #679

(Optional): Description

add method as follow:

public InnerSpec keys(Collection<?> keys) {
    keys.forEach(this::key())
    return this;
}

However, since the keys() method currently takes an Object as a parameter, I think we should approach method overloading very carefully.

How Has This Been Tested?

I written test code that takes a list as a parameter.

Is the Document updated?

No

SooKim1110 commented 7 months ago

Thanks for your contribution! If you don't mind, it would be great to have a similar method that accepts a collection as a parameter for values() and entries().