{"id":18074403,"url":"https://github.com/david-kariuki/junit5-testing-java","last_synced_at":"2026-03-05T09:33:14.920Z","repository":{"id":45585201,"uuid":"513055943","full_name":"david-kariuki/junit5-testing-java","owner":"david-kariuki","description":"This is a java project to learn JUnit testing. https://david-kariuki.github.io/JUnitTestingProject/","archived":false,"fork":false,"pushed_at":"2022-09-02T22:33:10.000Z","size":198,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T05:52:33.590Z","etag":null,"topics":["junit","junit-extension","junit-jupiter","junit-test","junit5"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/david-kariuki.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}},"created_at":"2022-07-12T08:14:26.000Z","updated_at":"2025-01-24T23:05:36.000Z","dependencies_parsed_at":"2022-07-19T12:54:21.015Z","dependency_job_id":null,"html_url":"https://github.com/david-kariuki/junit5-testing-java","commit_stats":null,"previous_names":["david-kariuki/junit5-testing-java"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/david-kariuki/junit5-testing-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-kariuki%2Fjunit5-testing-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-kariuki%2Fjunit5-testing-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-kariuki%2Fjunit5-testing-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-kariuki%2Fjunit5-testing-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/david-kariuki","download_url":"https://codeload.github.com/david-kariuki/junit5-testing-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-kariuki%2Fjunit5-testing-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30117719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T08:19:04.902Z","status":"ssl_error","status_checked_at":"2026-03-05T08:17:37.148Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["junit","junit-extension","junit-jupiter","junit-test","junit5"],"created_at":"2024-10-31T10:12:31.178Z","updated_at":"2026-03-05T09:33:14.877Z","avatar_url":"https://github.com/david-kariuki.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JUnit5TestingProject\n\n\u003cbr\u003e\n\n**Hello there**, \u003cbr\u003e\n\nThis is a java project to learn JUnit testing. Feel free to click on discussions for any comments, feedback, questions etc.\n\n\u003cbr\u003e\n\n![GitHub issues](https://img.shields.io/github/issues/david-kariuki/JUnit5TestingProject?\u0026labelColor=black\u0026color=eb3b5a\u0026label=Issues\u0026logo=issues\u0026logoColor=black\u0026style=for-the-badge) \u0026nbsp;\n![GitHub Contributions](https://img.shields.io/github/contributors/david-kariuki/JUnit5TestingProject?\u0026labelColor=black\u0026color=8854d0\u0026style=for-the-badge) \u0026nbsp;\n![repo size](https://img.shields.io/github/repo-size/david-kariuki/JUnit5TestingProject?label=Repo%20Size\u0026style=for-the-badge\u0026labelColor=black\u0026color=20bf6b) \u0026nbsp;\n![GitHub forks](https://img.shields.io/github/forks/david-kariuki/JUnit5TestingProject?\u0026labelColor=black\u0026color=0fb9b1\u0026style=for-the-badge) \u0026nbsp;\n![GitHub stars](https://img.shields.io/github/stars/david-kariuki/JUnit5TestingProject?\u0026labelColor=black\u0026color=f7b731\u0026style=for-the-badge) \u0026nbsp;\n![GitHub LastCommit](https://img.shields.io/github/last-commit/david-kariuki/JUnit5TestingProject?logo=github\u0026labelColor=black\u0026color=d1d8e0\u0026style=for-the-badge) \u0026nbsp;\n\n\u003cbr\u003e\n\n### 1. ASSERTIONS\n\n| # | **Assertion** |\n|-|-|\n| 1.  | assertNull() |\n| 2.  | assertNotNull() |\n| 3.  | assertEquals() |\n| 4.  | assertNotEquals() |\n| 5.  | fail() method |\n| 6.  | assertTrue() |\n| 7.  | assertFalse() |\n| 8.  | assertSame() |\n| 9.  | assertNotSame() |\n| 10. | assertArrayEquals() |\n| 11. | assertIterableEquals() |\n| 12. | assertThrows() |\n| 13. | assertTimeout() |\n| 14. | assertTimeoutPreemtively() |\n|||\n\n\u003cbr\u003e\n\n### 2. LIFECYCLE CALLBACKS\n\n| # | **JUnit 4 Callback** | **JUnit 5 Callback** |\n|-|-|-|\n| 1. | @Before      | @BeforeEach |\n| 2. | @BeforeClass | @BeforeAll |\n| 3. | @After       | @AfterEach |\n| 4. | @BeforeClass | @BeforeAll |\n| 5. | @AfterClass  | @AfterAll |\n| 6. | @RunWith     | @ExtendWith |\n| 7. | @Test        | @Test |\n| 8. | @Ignore      | @Disabled |\n| 9. | @Category    | @Tag |\n||||\n\n\u003cbr\u003e\n\n### 3. DISPLAY NAMES\n\n| # | **Annotation** | **Scope** |\n|-|-|-|\n| 1. | @DisplayName | Test Class |\n| 2. | @DisplayName | Test Methods |\n|||\n\n\u003cbr\u003e\n\n### 4. DEPENDENCY INJECTION:\n***For Constructors and Methods*** \u003cbr\u003e\n   \n   | # | **Class** |\n   |-|-|\n   | 1. | TestInfoParameterResolver |\n   | 2. | TestReporterParameterResovler |\n   | 3. | RepetitionInfoParameterResolver|\n   |||\n\n\u003cbr\u003e\n\n### 5. ASSUMPTIONS\n\n| # | **Assumption** |\n|-|-|\n| 1. | assumeTrue() |\n| 2. | assumeFalse() |\n| 3. | assumingThat() |\n|||\n\n\u003cbr\u003e\n\n### 6. OTHER ASSUMPTION LIBRARIES\n\n| # | **Library** |\n|-|-|\n| 1. | AssertJ |\n| 2. | Hamcrest |\n| 3. | JSONAsser |\n\n\u003cbr\u003e\n\n### 7. JUNIT 5 EXTENSIONS \n\n| # | Extension |\n|-|-|\n| 1. | TestInstancePostProcessor |\n| 2. | ExecutionCondition |\n| 3. | Life Cycle Callback Extensions | BeforeAllCallback, BeforeEachCallback, BeforeTestExecutionCallback, AfterTestExecutionCallback, AftereachCallback, AfterAllCallback |\n| 4. | ParameterResolver |\n| 5. | TestExecutionExceptionHandler |\n|||\n\n\u003cbr\u003e\n\n### 8. JUnit 5 EXTENSIONS REGISTRATION\n\n| # | **Registration** | Method |\n|-|-|-|\n| 1. | Declarative registration | @ExtendWith |\n| 2. | Programmatic registration | @RegisterExtension |\n| 3. | Automatic Registration | ***java.util.ServiceLoader*** |\n|||\n\n\u003cbr\u003e\n\n### 9. OTHER ANNOTATIONS\n\n| # | **Annottation** | Purpose |\n|-|-|-|\n| 1.  | @Enabled | Enable test method |\n| 2.  | @Disabled | Disbale test method |\n| 3.  | @EnabledIf | Enable with condition |\n| 4.  | @DisabledIf | Disable with condition |\n| 4.  | @EnabledIfEnvironmentVariable | Enable for environment |\n| 5.  | @DisabledIfEnvironmentVariable | Disable for Enviroment |\n| 6.  | @EnabledIfSystemProperty | Enable for system property |\n| 7.  | @DisabledIfSystemProperty | Disable for system property |\n| 8.  | @EnabledOnJre | Enable for JRE version |\n| 9.  | @DisabledOnJre | Disable for JRE version |\n| 10.  | @EnabledForJreRange | Enable for JRE range |\n| 11. | @DisabledForJreRange | Disable for JRE range |\n| 12. | @Nested | Nested test classes |\n| 13. | @ParameterizedTest - @ValueSource | Provide values array |\n| 14. | @ParameterizedTest - @EnumSource | Provide enum source |\n| 15. | @ParameterizedTest - @MethodSource | Provide values from method |\n| 16. | @ParameterizedTest - @CsvSource | Provide values from CSV |\n| 17. | @ParameterizedTest - @CsvFileSource | Provide values from CSV file |\n| 18. | @RepeatedTest | Repeated test with count @RepeatedTest(n) |\n| 19. | @TestFactory | For dynamic tests |\n| 20. | @Tag | For tagged test - Tests Classification |\n|||\n\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-kariuki%2Fjunit5-testing-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavid-kariuki%2Fjunit5-testing-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-kariuki%2Fjunit5-testing-java/lists"}