This course introduces Test-Driven Development (TDD) for Rust projects, covering the Red-Green-Refactor workflow, TDD mindset. 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 Rust: 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 (Rust)
- Write another failing test
- Make it pass again
- Refactor to use parameterized tests
- Unit 3: The TDD Mindset: Thinking in Tests with Rust
- Defining the first test for Shopping Cart totals
- Make it pass
- Write another failing test
- Make the Cart Total Function Work
- Refactor Shopping Cart Calculation in Rust
- Make it Red
- Make it Green
- Unit 4: Setting Up a Rust Testing Environment for TDD
- Writing Unit Tests for User Struct in Rust
- Refactoring Test Setup
- Group Email Tests
- Expect an Error
- Unit 5: Managing Dependencies in TDD with Rust
- Write your first failing test
- Make It Pass
- Refactor
- Write a test that expects logging (Red)
- Make the tests pass
- Refactor UserManager
- Unit 6: Introduction to the AAA Pattern in TDD with Rust
- Refactor Tests with the AAA Pattern