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.
Overview
Syllabus
- Unit 1: Introduction to TDD with Java: What, Why, and How
- Write a Test, Watch It Fail
- Make the Test Pass!
- Refactor for Readability and Clarity
- Unit 2: Generalizing Solutions with Test Driven Development
- Write Another Failing Test
- Make it Pass Again!
- Refactor to Use Parameterized Tests
- Unit 3: The TDD Mindset: Thinking in Tests with Java
- 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!
- Unit 4: Setting Up and Mastering Testing in Java with JUnit
- 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
- Unit 5: Managing Dependencies in TDD with Java
- Writing the First Failing Test
- Making it Pass!
- Refactoring the Test!
- Testing for Logging (Red)
- Make it Pass Again!
- Refactoring for Efficiency
- Unit 6: Introduction to the AAA Pattern in TDD
- Refactor Tests with AAA Pattern