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
IgnoreDefaultArgsConstructorCustomisation customisation works great for classes with default values.
However, we encountered a case, when class has an enum type and we use IgnoreDefaultArgsConstructorCustomisation fixture creation fails with java.util.NoSuchElementException: List is empty..
Is there a way around this? Thanks.
Example
data class MyClass(val id: String = " ", val value: Int = 1, val type: Type = Type.NORMAL)
enum class Type {
NORMAL,
ADVANCED
}
private val fixture = KFixture().apply {
add(IgnoreDefaultArgsConstructorCustomisation())
}
@Test
fun test() {
val fixture = fixture<MyClass>() // fails at `MostParameterConstructorQuery ` class
}
IgnoreDefaultArgsConstructorCustomisation
customisation works great for classes with default values.However, we encountered a case, when class has an enum type and we use
IgnoreDefaultArgsConstructorCustomisation
fixture creation fails withjava.util.NoSuchElementException: List is empty.
.Is there a way around this? Thanks.
Example
FYI @TWiStErRob ☝🏽
The text was updated successfully, but these errors were encountered: