You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When toString() function is called on certain data class instances generated by Fixture Monkey an exception is thrown. I guess the problem might be located in FunctionalInterfaceArbitraryIntrospector.
Your environment
version of Fixture Monkey - 1.1.8
version of Java/Kotlin - 1.9.25
Steps to reproduce
data class MyData2(
val roll : () -> Int
)
@Test
@Seed(30)
fun test() {
val sampled = FixtureMonkeyBuilder()
.plugin(KotlinPlugin())
.build()
.giveMeKotlinBuilder<MyData2>()
.sample()
println("sampled: $sampled")
}
Expected behaviour
I would expect a proper toString return value
Actual behaviour
java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')
at jdk.proxy2/jdk.proxy2.$Proxy13.toString(Unknown Source)
at java.base/java.lang.StringConcatHelper.stringOf(StringConcatHelper.java:467)
at com.manikoske.guild.encounter.CharacterStateTest$MyData2.toString(CharacterStateTest.kt)
at java.base/java.lang.StringConcatHelper.stringOf(StringConcatHelper.java:467)
at java.base/java.lang.StringConcatHelper.simpleConcat(StringConcatHelper.java:422)
at com.manikoske.guild.encounter.CharacterStateTest.test(CharacterStateTest.kt:32)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
The text was updated successfully, but these errors were encountered:
Describe the bug
When toString() function is called on certain data class instances generated by Fixture Monkey an exception is thrown. I guess the problem might be located in FunctionalInterfaceArbitraryIntrospector.
Your environment
Steps to reproduce
Expected behaviour
I would expect a proper toString return value
Actual behaviour
The text was updated successfully, but these errors were encountered: