{"id":19404267,"url":"https://github.com/dussanfreire/unit-testing__bank-app-example","last_synced_at":"2026-06-13T12:33:40.515Z","repository":{"id":46095165,"uuid":"427786090","full_name":"DussanFreire/Unit-Testing__Bank-App-Example","owner":"DussanFreire","description":"Aplicación de consola para hacer pruebas de unidad","archived":false,"fork":false,"pushed_at":"2024-10-10T13:01:40.000Z","size":418,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T12:47:29.512Z","etag":null,"topics":["jacoco","junit","unit-testing"],"latest_commit_sha":null,"homepage":"","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/DussanFreire.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-11-13T22:28:45.000Z","updated_at":"2024-10-11T02:45:35.000Z","dependencies_parsed_at":"2024-11-10T11:40:35.680Z","dependency_job_id":"736823e7-372f-4dae-968e-7da0e2ff2109","html_url":"https://github.com/DussanFreire/Unit-Testing__Bank-App-Example","commit_stats":null,"previous_names":["dussanfreire/unit-testing__bank-app-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DussanFreire%2FUnit-Testing__Bank-App-Example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DussanFreire%2FUnit-Testing__Bank-App-Example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DussanFreire%2FUnit-Testing__Bank-App-Example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DussanFreire%2FUnit-Testing__Bank-App-Example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DussanFreire","download_url":"https://codeload.github.com/DussanFreire/Unit-Testing__Bank-App-Example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240581423,"owners_count":19824139,"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":["jacoco","junit","unit-testing"],"created_at":"2024-11-10T11:33:50.172Z","updated_at":"2026-06-13T12:33:40.458Z","avatar_url":"https://github.com/DussanFreire.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unit Testing with JUnit and JaCoCo - Bank app\r\n\r\n## Creation and Execution Process\r\n\r\n### Test Setup with JUnit\r\n\r\n1.\tA test folder was created to store all test files.\r\n2.\tInside the test folder, right-click and select New \u003e JUnit Test Case.\r\n3.\tEnter the name of the test in the “Name” field.\r\n4.\tClick Finish, and the test will appear in the chosen folder.\r\n\r\n### Running Tests and Configuring Coverage with JaCoCo\r\n\r\n1.\tTo run the tests and see the code coverage, click on the second “Play” button and configure the project’s coverage.\r\n2.\tSelect the option “Run all tests in the selected project, package, or source folder” to view complete coverage.\r\n3.\tThe console will display the number of tests executed, passed, failed, and skipped.\r\n\r\n## Results\r\n\r\nThe project achieved a total coverage of 81.8%, with the remaining 18.2% primarily consisting of alternative search methods not yet used in the application, along with several files containing constant variables used throughout the program.\r\n\r\nHowever, efforts were made to maximize coverage in the most critical modules, which include Account, Bank, and BankManager. This allowed the team to optimize the sprint by focusing on verifying the correct functionality of these core modules. Based on this approach, the results are considered satisfactory.\r\n\r\n## Code Structure: S.O.L.I.D. Principles\r\n\r\n### Single Responsibility Principle\r\n\r\nThis principle was applied throughout most of the project. Specifically, a new class BankOperator was created to reduce the responsibilities of the Bank class.\r\n\r\n### Open-Closed Principle\r\n\r\nThe interface IWithdrawMoney and the abstract classes NoCommission and Commission were introduced to enable extending different account types without modifying the existing ones.\r\n\r\n\r\n### Liskov Substitution Principle\r\n\r\nThe NoCommission and Commission classes ensure that the current account types are not affected by future updates or the addition of new accounts.\r\n\r\n### Interface Segregation Principle\r\n\r\nThe interface IWithdrawMoney was created to avoid forcing classes to implement methods they do not use. For instance, the HousingAccount class previously had to implement the method from the Account class, but now only accounts that require it implement it, while others do not.\r\n\r\n### Dependency Inversion Principle\r\n\r\nThe responsibilities handled by the Bank class were divided into smaller modules, creating a higher-level dependency. Additionally, the account types were separated, whereas before they all depended on a single class.\r\n\r\n## References\r\n* Code Report: https://docs.google.com/document/d/1buC5zROhoB11TnzNdj1LYlQdBLAEp-mD4scKg1dxlGE/edit?usp=sharing\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdussanfreire%2Funit-testing__bank-app-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdussanfreire%2Funit-testing__bank-app-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdussanfreire%2Funit-testing__bank-app-example/lists"}