{"id":18474419,"url":"https://github.com/codecop/lcd-numbers-mocking-kata","last_synced_at":"2025-05-13T14:30:25.002Z","repository":{"id":141739043,"uuid":"213035848","full_name":"codecop/LCD-Numbers-Mocking-Kata","owner":"codecop","description":"Add tests to LCD Numbers Kata using test doubles.","archived":false,"fork":false,"pushed_at":"2020-02-22T09:58:18.000Z","size":335,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-16T19:33:28.302Z","etag":null,"topics":["code-kata","exercise","kata","mocking","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codecop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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":"2019-10-05T16:49:32.000Z","updated_at":"2021-04-26T19:23:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"d748c8ab-22b3-4882-bca7-6bae6b093d54","html_url":"https://github.com/codecop/LCD-Numbers-Mocking-Kata","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecop%2FLCD-Numbers-Mocking-Kata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecop%2FLCD-Numbers-Mocking-Kata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecop%2FLCD-Numbers-Mocking-Kata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecop%2FLCD-Numbers-Mocking-Kata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codecop","download_url":"https://codeload.github.com/codecop/LCD-Numbers-Mocking-Kata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253960054,"owners_count":21990798,"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":["code-kata","exercise","kata","mocking","unit-testing"],"created_at":"2024-11-06T10:29:24.388Z","updated_at":"2025-05-13T14:30:24.971Z","avatar_url":"https://github.com/codecop.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Creating Tests for LCD Numbers Kata by Mocking Collaborators\n\nThis is an implementation of the [LCD Numbers Kata](http://rubyquiz.com/quiz14.html)\nusing outside-in development. There are no tests. In order to unit test its\nclasses you need to create [test doubles](http://martinfowler.com/bliki/TestDouble.html)\nfor the collaborators.\n\nThe starting point is available in different programming languages.\n\n## Requirements (copied from Ruby Quiz)\n\nThe `LcdDisplay` creates an LCD string representation of an integer value using a\n4x7 grid of space each, using minus and pipe characters for each digit.\nEach digit is shown below:\n\n     --      --  --      --  --  --  --  --\n    |  |   |   |   ||  ||   |      ||  ||  |\n    |  |   |   |   ||  ||   |      ||  ||  |\n             --  --  --  --  --      --  --\n    |  |   ||      |   |   ||  |   ||  |   |\n    |  |   ||      |   |   ||  |   ||  |   |\n     --      --  --      --  --      --  --\n\nThe bar size should be adjustable. The default value is 2 - as shown above.\nRead more about it at [RubyQuiz](http://rubyquiz.com/quiz14.html).\n\n## Description of Existing Solution\n\nTo make things easier for you, the solutions are described in their Readme together\nwith an UML diagram.\n\n## Creating Unit Tests\n\nCreate unit tests for all functions and classes. Make sure all units are tested in isolation.\nThe point of this exercise is to go extreme to practise using test doubles.\n**Create test doubles for everything!** Create dummy objects for all used values\nand stub all collaborators, even the most simple ones.\n\n### Check your Coverage\n\nTo measure your progress you should use code coverage tools.\n\n### Warning\n\nEnforcing all calls to other functions and classes in a test is not recommended in real unit tests\nbecause this leads to bad tests which are bound to the implementation. These\nover specified tests make it impossible to change the code under test without breaking.\nWe want to be able to change the code without breaking the test as long as the\nrequired functionality is not changed. This exercise is for practising test doubles.\n\n### License\n\nThis work is licensed under a [New BSD License](http://opensource.org/licenses/bsd-license.php), see `license txt` in repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecop%2Flcd-numbers-mocking-kata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodecop%2Flcd-numbers-mocking-kata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecop%2Flcd-numbers-mocking-kata/lists"}