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

Unable to set value on Object #874

Closed esfomeado closed 8 months ago

esfomeado commented 8 months ago

Describe the bug

When trying to set a value on a variable of type Object an exception is thrown. E.g.:

java.lang.IllegalArgumentException: The value is not of the same type as the property.
parent node type : com.example.bug.ObjectTest node name: object, node type: java.lang.Object, value type: java.lang.String

This issue was introduced on 1.0.9

Your environment

Steps to reproduce

https://github.com/esfomeado/fixture-monkey-bug/blob/master/src/test/java/com/example/bug/FixtureMonkeyTest.java#L123

Expected behaviour

I should be able to set a string in a object type like in previous versions.

Actual behaviour

It's not possible to set a string on a object type.

seongahjo commented 8 months ago

@esfomeado Hello, thank you for reporting an issue. It is a bug, It'll be fixed in 1.0.10! I'll let you know when it is published.

seongahjo commented 8 months ago

@esfomeado 1.0.10 is released. Please check it out!

esfomeado commented 8 months ago

Fixed thanks