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

I want fields to be injected with a Kotlin Duration type #962

Closed this-is-spear closed 1 month ago

this-is-spear commented 6 months ago

Describe the feature you request

The user doesn't understand why the field needs to be injected with the Long type.

sut.giveMeBuilder<DurationValue>()
    .set(DurationValue::duration, Long.MAX_VALUE)
    .sample()

Suggest A Solution

For ease of use, Duration needs to be modified to allow you to inject Duration values.

sut.giveMeBuilder<DurationValue>()
    .set(DurationValue::duration, Duration.INFINITE)
    .sample()

If the feature request is approved, would you be willing to submit a PR?

Yes

seongahjo commented 6 months ago

@this-is-spear Sounds great. Could you make a PR for it?

this-is-spear commented 6 months ago

Okay, good!