{"id":21634419,"url":"https://github.com/solangeug/trip-service-refactoring","last_synced_at":"2025-06-29T14:32:29.971Z","repository":{"id":91394883,"uuid":"170832916","full_name":"SolangeUG/trip-service-refactoring","owner":"SolangeUG","description":"Kata for a legacy code hands-on session. The objective is to write tests and refactor the given legacy code.","archived":false,"fork":false,"pushed_at":"2019-02-15T08:59:07.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T22:40:41.563Z","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/SolangeUG.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":"2019-02-15T08:54:40.000Z","updated_at":"2019-02-15T09:04:37.000Z","dependencies_parsed_at":"2023-03-08T19:00:20.927Z","dependency_job_id":null,"html_url":"https://github.com/SolangeUG/trip-service-refactoring","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SolangeUG/trip-service-refactoring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolangeUG%2Ftrip-service-refactoring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolangeUG%2Ftrip-service-refactoring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolangeUG%2Ftrip-service-refactoring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolangeUG%2Ftrip-service-refactoring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SolangeUG","download_url":"https://codeload.github.com/SolangeUG/trip-service-refactoring/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolangeUG%2Ftrip-service-refactoring/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262609038,"owners_count":23336619,"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":[],"created_at":"2024-11-25T03:16:39.544Z","updated_at":"2025-06-29T14:32:29.962Z","avatar_url":"https://github.com/SolangeUG.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Testing legacy code: Hard-wired dependencies\n============================================\n\nCode related to my [Testing legacy code: Hard-wired dependencies][1] blog post. Try not reading the blog post before doing the exercise yourself.\n\nWhat is it about?\n-----------------\n\nProvides an example of existing code that needs to be unit tested. But there is one rule:\n\n\u003e We can't change any existing code if not covered by tests. The only exception is if we need to change the code to add unit tests, but in this case, just automated refactorings (via IDE) are allowed. \n\nAlthough this is a very small piece of code, it has a lot of the problems that we find in legacy code. \n\nDetails\n-------\n\nIf you want to give it a go, the starting point is [TripServiceTest.java][3] and [TripService.java][4]. Try unit testing it following the rule above.\n\nFor future comparisions, when you are done, you can always check [TripService_Original.java][2]\n\n[1]: http://codurance.com/2011/07/16/testing-legacy-hard-wired-dependencies/ \"Testing legacy code: Hard-wired dependencies blog post\"\n[2]: https://github.com/sandromancuso/trip-service-kata/blob/master/java/trip-service-kata/src/main/java/org/craftedsw/tripservicekata/TripService_Original.java \"TripService_Original.java\"\n[3]: https://github.com/sandromancuso/trip-service-kata/blob/master/java/trip-service-kata/src/test/java/org/craftedsw/tripservicekata/TripServiceTest.java \"TripServiceTest.java\"\n[4]: https://github.com/sandromancuso/trip-service-kata/blob/master/java/trip-service-kata/src/main/java/org/craftedsw/tripservicekata/trip/TripService.java \"TripService.java\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolangeug%2Ftrip-service-refactoring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolangeug%2Ftrip-service-refactoring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolangeug%2Ftrip-service-refactoring/lists"}