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

Class changes when setting value #958

Closed esfomeado closed 6 months ago

esfomeado commented 6 months ago

Describe your question

I´ve created this as question because I wasn´t sure if this is the intended behavior.

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

On this test I have two class. A and B.

I then I create a B object and set it on the Alphabet. The issue is that the class will change from B to A sometimes.

If I use the Values.just it works but I would except to use the same class type as the one that I pass in and not another subtype.

Thanks

seongahjo commented 6 months ago

@esfomeado Hello, thank you for reporting an issue. It is unintentional. It is actually a bug.

I'll fix it in 1.0.15

seongahjo commented 6 months ago

@esfomeado Thanks for waiting. 1.0.15 is released. Please check if it is fixed.

esfomeado commented 6 months ago

It's fixed. Thanks