Consider we have a class to create a fixture like this:
class MyClass {
var name: String = "initial value"
protected set
}
when we do:
kotlinFixture {
property(MyClass::name) { "test" }
}
will throw an exception like this:
java.lang.UnsupportedOperationException: Unable to handle MyClass
Unable to resolve class MyClass
Unable to populate class MyClass
Unable to instantiate class MyClass using factory methods
at com.appmattus.kotlinfixture.Fixture.create(KotlinFixture.kt:85)
because the proeprty name doesn't provide public setter.
How do I customize that field?
Consider we have a class to create a fixture like this:
when we do:
kotlinFixture { property(MyClass::name) { "test" } }will throw an exception like this:
because the proeprty
namedoesn't provide public setter.How do I customize that field?