fixture-monkey icon indicating copy to clipboard operation
fixture-monkey copied to clipboard

I want fields to be injected with a Kotlin Duration type

Open this-is-spear opened this issue 1 year ago • 2 comments

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

this-is-spear avatar Mar 24 '24 00:03 this-is-spear

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

seongahjo avatar Mar 26 '24 03:03 seongahjo

Okay, good!

this-is-spear avatar Mar 27 '24 03:03 this-is-spear