{"id":30727582,"url":"https://github.com/fcbento/java-junit-oop-study-case","last_synced_at":"2026-05-18T03:34:10.207Z","repository":{"id":311333807,"uuid":"1043047904","full_name":"fcbento/java-junit-oop-study-case","owner":"fcbento","description":"Java console-based library management system with user, book, and loan management, featuring unit and E2E tests with high coverage","archived":false,"fork":false,"pushed_at":"2025-08-23T04:38:42.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-03T14:12:33.156Z","etag":null,"topics":["jacoco","java","junit5","maven","mockito"],"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/fcbento.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,"zenodo":null}},"created_at":"2025-08-23T03:26:32.000Z","updated_at":"2025-08-23T04:42:58.000Z","dependencies_parsed_at":"2025-08-24T08:38:57.785Z","dependency_job_id":"1a5b755c-b5be-4e81-bb56-04d69b024cec","html_url":"https://github.com/fcbento/java-junit-oop-study-case","commit_stats":null,"previous_names":["fcbento/java-junit-oop-study-case"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fcbento/java-junit-oop-study-case","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcbento%2Fjava-junit-oop-study-case","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcbento%2Fjava-junit-oop-study-case/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcbento%2Fjava-junit-oop-study-case/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcbento%2Fjava-junit-oop-study-case/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fcbento","download_url":"https://codeload.github.com/fcbento/java-junit-oop-study-case/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcbento%2Fjava-junit-oop-study-case/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33163756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"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":["jacoco","java","junit5","maven","mockito"],"created_at":"2025-09-03T14:07:33.932Z","updated_at":"2026-05-18T03:34:10.191Z","avatar_url":"https://github.com/fcbento.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Library Management System\n\n![Coverage](https://img.shields.io/badge/Coverage-93%25-brightgreen)\n\n## Description\n\nThis project is a smalll **library management system** built in Java. It is built to practice some of the oop concepts as it's been kind of a while I don't actually pay due attention to them. Like both polymorphism and abstraction for example. There's definitely though a lot to build in this project yet as I covered only the basics for now. It's been fun playing a little with ``` Scanner(System.in)``` and ```System.out.println()```again. It felt a lot like university.\n\nCurrent features are:\n\n- Create users\n- Loan books\n- See loaned books\n- List available books\n\nThe project uses model, repository, service, controller, and view layers for a more clean structure.\n\n---\n\n## Project Structure\n\n```text\n    src/main/java/com/library\n        ├── controller         # System controllers\n        ├── enums              # Enums used in the system\n        ├── model              # Data models\n        ├── repository         # Data storage\n        ├── service            # Business logic\n        ├── util               # Utilities (e.g., BookGenerator to display random books)\n        └── view               # Console interfaces\n```\n\n```text\n    src/test/java/com/library\n        ├── controller         # Controller unit tests\n        ├── repository         # Repository unit tests\n        ├── service            # Service unit tests\n        └── view               # Console integration e2e\n```\n\n---\n\n## How to Run\n\n1. Clone the repository and run the project:\n\n```bash\ngit clone https://github.com/fcbento/java-junit-oop-study-case.git\n\ncd java-junit-oop-study-case\n\nmvn compile\n\nmvn exec:java -Dexec.mainClass=\"src.main.java.com.library.Main\"\n```\n2. Run tests\n```\nmvn test\n```\n\n## Code coverage\n\n| Package / Element                    | Instructions | Branches | Lines | Methods | Classes |\n| ------------------------------------ | ------------ | -------- | ----- | ------- | ------- |\n| src.main.java.com.library.model      | 60%          | 0%       | 44    | 23      | 3       |\n| src.main.java.com.library            | 95%          | 77%      | 38    | 7       | 1       |\n| src.main.java.com.library.view       | 98%          | 100%     | 75    | 12      | 4       |\n| src.main.java.com.library.util       | 98%          | 100%     | 13    | 3       | 1       |\n| src.main.java.com.library.repository | 100%         | 100%     | 29    | 13      | 3       |\n| src.main.java.com.library.controller | 100%         | n/a      | 16    | 8       | 3       |\n| src.main.java.com.library.service    | 100%         | n/a      | 16    | 9       | 3       |\n| src.main.java.com.library.enums      | 100%         | n/a      | 5     | 1       | 1       |\n\n![Overall coverage](https://img.shields.io/badge/Overall-93%25-brightgreen)\n![Main business layers](https://img.shields.io/badge/Main-100%25-brightgreen)\n\n## Technologies\n\n- Java 17\n- JUnit 5\n- Mockito\n- Maven\n- JaCoCo\n\n## Some notes\n\n- Views were refactored to allow Scanner dependency injection, making automated testing possible.\n\n- Data is stored in memory; there is no database persistence but maybe it wouldn't be a bad idea to plug the repository layer to an actual database.\n\n- This project is only intended as a learning exercise for best practices, OOP, and mostly test coverage.\n\n## Author\n\n\u003ca href=\"https://github.com/fcbento/angular-20-groqai-signals-deferrable-views/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=fcbento/angular-20-groqai-signals-deferrable-views\" alt=\"contrib.rocks image\"/\u003e\n\u003c/a\u003e\n\n## Contact\n\n[![linkedin](https://skillicons.dev/icons?i=linkedin)](https://linkedin.com/in/felipe-bento)\n[![discord](https://skillicons.dev/icons?i=discord)](https://discordapp.com/users/413141379074490369)\n[![gmail](https://skillicons.dev/icons?i=gmail)](mailto:felipe.16costa@gmail.com)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcbento%2Fjava-junit-oop-study-case","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffcbento%2Fjava-junit-oop-study-case","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcbento%2Fjava-junit-oop-study-case/lists"}