{"id":16830077,"url":"https://github.com/mwoss/mockk-examples","last_synced_at":"2025-03-17T22:46:18.006Z","repository":{"id":106928999,"uuid":"357149496","full_name":"mwoss/mockk-examples","owner":"mwoss","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-12T10:25:52.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T08:23:19.495Z","etag":null,"topics":["example","kotlin","mock","mockk","testing"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mwoss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-12T10:23:06.000Z","updated_at":"2021-04-12T11:30:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"85591baf-e388-4cde-a00d-fbb7e3ad122e","html_url":"https://github.com/mwoss/mockk-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwoss%2Fmockk-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwoss%2Fmockk-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwoss%2Fmockk-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwoss%2Fmockk-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mwoss","download_url":"https://codeload.github.com/mwoss/mockk-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244121660,"owners_count":20401288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["example","kotlin","mock","mockk","testing"],"created_at":"2024-10-13T11:37:21.978Z","updated_at":"2025-03-17T22:46:17.969Z","avatar_url":"https://github.com/mwoss.png","language":"Kotlin","readme":"# Mocking examples using Mockk (Kotlin)\nThis repository contains a dozen or so mocking examples using [Mockk](https://github.com/mockk/mockk) library.   \nRepository contains only basic examples which are mostly used in day to day work. For more advanced topics please check official [Mockk documentation](https://mockk.io/)\n\nAll examples can be found in test directory: `src/test/kotlin`\n\nTopics covered in examples: \n* types of Mocks (MockK, SpyK, RelaxedMock)\n* object and static class mocking\n* partial matching (matchers)\n* hierarchical mocking\n* slot capturing\n* verification (verify block)\n* private method mocking\n* constructor mocking\n\nAlso, I highly recommend reading [Unraveling MockK’s black magic](https://chao2zhang.medium.com/unraveling-mockks-black-magic-e725c61ed9dd) article in some point of your journey with Mockk.  \nIt will allow you to understand how Mockk works underneath. This should help you to write better tests/mocks and quickly find a root cause of failing tests.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwoss%2Fmockk-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmwoss%2Fmockk-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwoss%2Fmockk-examples/lists"}