{"id":19055861,"url":"https://github.com/danny02/do-not-mock-examples","last_synced_at":"2026-06-23T11:31:51.234Z","repository":{"id":144774264,"uuid":"543367178","full_name":"Danny02/do-not-mock-examples","owner":"Danny02","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-23T08:24:56.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-12T11:32:16.012Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/Danny02.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":"2022-09-30T00:17:54.000Z","updated_at":"2022-09-30T00:19:46.000Z","dependencies_parsed_at":"2023-07-25T07:13:12.451Z","dependency_job_id":null,"html_url":"https://github.com/Danny02/do-not-mock-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Danny02/do-not-mock-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danny02%2Fdo-not-mock-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danny02%2Fdo-not-mock-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danny02%2Fdo-not-mock-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danny02%2Fdo-not-mock-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Danny02","download_url":"https://codeload.github.com/Danny02/do-not-mock-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danny02%2Fdo-not-mock-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34686727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-08T23:47:14.349Z","updated_at":"2026-06-23T11:31:51.209Z","avatar_url":"https://github.com/Danny02.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test examples exposing Mocks as the root of all evil\n\nHere you will find a collection of cases in which fakes result\nin more stable tests then if mocks where used.\n\n## Cases\n\n### CQRS\n\nThis is a more involved case. You can find a service that writes \nand reads customer data. The data is managed in a write and read\nmodel, which is updated from the write model.\n\nThe case consist of two similar implementations, which only differ\nin the implementation of persistent layer. \n\nIn this scenario the application started with the version which\nused a delete flag (flag package). This was then refactored to\njust delete data directly (direct packag).\n\nThe refactored version (direct) contains a bug in the service \ncode.\n\nTests with mocks do not detect this bug, as can be seen \nby executing the tests.\n\n### Logging\n\nShows the problems when mocking overloaded methods. \nThe difficulties mocking Slf4j are also shown.\n\n### Mockery \n\nA real world implementation and test, which does not test anything.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanny02%2Fdo-not-mock-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanny02%2Fdo-not-mock-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanny02%2Fdo-not-mock-examples/lists"}