Hi. I have an `Enum` class with `kotlinx-serializa...
# mockk
c
Hi. I have an
Enum
class with
kotlinx-serialization
.
Copy code
@Serializable
enum class Certificate {
  @SerialName("Certificate_A") A
}
For the purposes of testing, I want to add another
Enum
entry.
Copy code
@SerialName("Certificate_B") B
How do I do that with
mockk
?
e
you can't
1
m
What do you want to test here?
c
@Mattia Tommasone, I have a function that accepts the
Certificate
Enum
as a parameter. I wan to pass in an invalid
Enum
value to test a failure case.
m
I don’t understand. Passing an enum value that is not in the enum would be a compile error, why do you want to test it at runtime?