Changelog
🚀 Features
- #15 Now it's possible to use
every and everySuspend with function references.
every(foo::getAt) returns 10
every(foo::values::get) returns listOf(2, 3)
every(foo::values::set) returns Unit
foo.values // returns listOf(2, 3)
foo.values = emptyList() // returns Unit
foo.getAt(0) // returns 10
foo.getAt(1) // returns 10
foo.getAt(2) // returns 10
- #126 Now it's possible to configure annotations that are copied from a type to a mock implementation.
import dev.mokkery.options.AnnotationSelector.Companion.all
import dev.mokkery.options.AnnotationSelector.Companion.none
import dev.mokkery.options.AnnotationSelector.Companion.named
mokkery {
annotations {
copyToMock = none // No annotations
copyToMock = all - named("example.A") // All annotations except "example.A"
copyToMock = named("example.A") // Only "example.A"
}
}
✨ Improvements
mokkery-plugin is now published as a fat JAR. This makes compiler plugin setup without the Gradle plugin easier.
- Improved compiler options syntax. Another step toward setup without the Gradle plugin.
🐛 Bug fixes
- Avoid trying to access non-public constructors while stubbing
- Fix incorrectly listing open types as problematic when only one of stub types is raised
🌳 Dependencies
- Bump Kotlin to 2.3.10
- Bump atomicfu to 0.31.0