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

Enhance Kotlin introspector to support Java reference types #947

Closed jinia91 closed 6 months ago

jinia91 commented 6 months ago

Summary

This is a pr regarding the issue at https://github.com/naver/fixture-monkey/issues/946

i have made modification toPrimaryConstructorArbitraryIntrospector to handle kotlin and java class both.

additionaly added a corresponding test case.

The current modification serves as a temporary measure to prevent failures during object creation;

however, it results in the fields of the internal Java reference type properties being bound to null. It has also been observed that the same issue occurs when using other introspectors.

Fundamentally, it seems necessary to implement branching at a higher level in the introspector process, but due to a lack of comprehensive understanding of the overall structure, only this level of modification has been made.

How Has This Been Tested?

check through test case

Is the Document updated?

-