Kmock
A humble mocking library for Kotlin, KotlinJS and Kotlin Multiplatform using Kotlin Symbol Processing (KSP).
Install / Use
/learn @bitPogo/KmockREADME
KMock
A humble mocking library for Kotlin, KotlinJS and Kotlin Multiplatform using Kotlin Symbol Processing (KSP).
About The Project
Writing mocks is certainly no witchcraft, but doing them by hand day for day can be dull. More importantly it takes time which can be better invested directly into writing tests. However, while JVM projects get indeed supreme support by either MockK or Mockito, Kotlin Multiplatform still has nothing comparable. KMock aims to fill that gap and will hopefully advance to there over time. Similar to other projects it uses KSP, but it is capable of associating generated Mocks correctly to their belonging shared source sets (like native, ios, etc) without additional setup and with minimal boilerplate done by consumers. KMock works currently only based on interfaces. It supports to some extent features like spying and relaxation of Mocks to make them non intrusive. So if the project caught your eye check out the Playground or dive into the Documentation.
Dependencies
KMock has the following dependencies:
- AndroidGradlePlugin (AGP) 7.3.1
- Kotlin 1.8.0
- AtomicFu 0.19.0
- Touchlab's Stately 1.2.3
- Square KotlinPoet 1.12.0
- Kotlin Symbol Processing (KSP) 1.8.0-1.0.8
- Gradle 7.5.1
Additional Requirements
- Android 5.0 (API 21) to Android 13 (API 33)
- Java 11
Changelog
See changelog.
Versioning
This project uses Semantic Versioning as a guideline for our versioning.
Contributing
You want to help or share a proposal? You have a specific problem? Read the following:
- Code of Conduct for details on our code of conduct.
- Contribution Guide for details about how to report bugs and propose features.
Releasing
Please take a look here.
Copyright and License
Copyright (c) 2024 Matthias Geisler / All rights reserved.
Please refer to the License for further details.
Related Skills
gh-issues
342.0kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
node-connect
342.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Writing Hookify Rules
84.7kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
