naver / fixture-monkey

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

Modify the way a value class is used to output arbitrary value #967

Closed this-is-spear closed 6 months ago

this-is-spear commented 7 months ago

Summary

962

Fixed to use kotlin duration in the set function.

(Optional): Description

Fixed NodeSetDecomposedValueManipulator throwing an exception because the object node and value class types did not match.

Fixed an issue in PrimaryConstructorArbitraryIntrospector#resolveArbitrary where when injecting Duration, it was trying to inject Duration class as Duration because Duration is a value.

As we progressed, there was an issue where the value class didn't have its own type and the operation was proceeding. So we fixed the code so that the value class can continue working with its own type.

How Has This Been Tested?

To test Duration, we added or reused the validation logic below.

To test Value class, we added or reused the validation logic below.

Is the Document updated?

We didn't update the documentation because there were no feature changes.

this-is-spear commented 6 months ago

I modified the PR topic because the focus was on the work done to get the Value class creation working correctly. I believe one of the subtasks was to fix the Duration class to work correctly.

I thought it needed to be fixed in order to see and understand the git history.

If you need to change to the previous topic, please let me know. I'll fix it. ☺️

this-is-spear commented 6 months ago

It's all thanks to the maintainer's help! I learned a lot 🙇‍♂️