I'm using a library that contains a couple of classes like this:
data class Foo(...) {
data class Data(...)
}
data class Bar(...) {
data class Data(...)
}
When trying to write tests, I'd like to generate fakes based on those Data classes, and so I added
@UsesFakes(Foo.Data::class)
and
@UsesFakes(Bar.Data::class)
to their respective cases.
Unfortunately I get a kotlin.io.FileAlreadyExistsException where fakeData already exists. Is there a way to give a custom name to the fake? something like
Hi there,
I'm using a library that contains a couple of classes like this:
When trying to write tests, I'd like to generate fakes based on those
Data
classes, and so I addedand
to their respective cases.
Unfortunately I get a
kotlin.io.FileAlreadyExistsException
wherefakeData
already exists. Is there a way to give a custom name to the fake? something likeCheers!