Week 3

Collections

Generics

Enums

Stream APIs

Unit Testing with JUnit

Debugging in Java

Practice

Assignment

Back end Track

Under construction

<aside> 🚧

This page is currently under construction. Please check back later.

</aside>

Implementation plan:

NOTE: Unit tests was covered in core program Week 5 - Problem solving methods. Teach Unit tests from the Java point of view.

  1. Setting up JUnit 5 as a dependency
  2. Test class structure and naming conventions
  3. @Test annotation
  4. Writing a first test
  5. Assertions: assertEquals, assertNotEquals, assertTrue, assertFalse
  6. assertThrows — testing exception behavior
  7. Arrange-Act-Assert pattern
  8. Running tests in IntelliJ
  9. Test isolation — each test is independent
  10. @BeforeEach and @AfterEach for setup/teardown
  11. Exercise: write tests for a class from a previous chapter

The HackYourFuture curriculum is licensed under CC BY-NC-SA 4.0

CC BY-NC-SA 4.0 Icons

*https://hackyourfuture.net/*

Found a mistake or have a suggestion? Let us know in the feedback form.