Foundations of TDD in Java with JUnit: The Principles
This course introduces Test-Driven Development (TDD) for Java projects, covering the Red-Green-Refactor workflow, TDD mindset, and setup with JUnit. Learn best practices like SOLID principles and dependency injection, and explore TDD's impact on code quality and speed compared to traditional approaches.
Lessons and practices
Write a Test, Watch It Fail
Make the Test Pass!
Refactor for Readability and Clarity
Write Another Failing Test
Make it Pass Again!
Refactor to Use Parameterized Tests
Defining the First Test for Shopping Cart Totals
Making the Test Pass!
Creating Another Failing Test
Make the Cart Total Function Work
Refactor Your Cart Total Function
Make it Red
Making it Green!
Refactor with Streams!
Understanding Testing with JUnit in Java
Using Some Assertions
Refactor Test Setup with @BeforeEach
Group Email Tests Using @Nested
Expect an Exception!
Write a Parametrized Test
Writing the First Failing Test
Making it Pass!
Refactoring the Test!
Testing for Logging (Red)
Make it Pass Again!
Refactoring for Efficiency
Refactor Tests with AAA Pattern
Interested in this course? Learn and practice with Cosmo!
Practice is how you turn knowledge into actual skills.