Welcome to 'Introduction to Test-Driven Development in C#'
Hi,
I'm Olaf. I've been developing software for nearly 30 years. I've been working with C#.NET since its original release in 2002, and I have been coding in TDD for more than 10 years.
As you can imagine, with so much experience, I have absorbed exclusive programming knowledge that will be useful to you—much of which I will be sharing with you in this course. I have created this course so that you not only learn TDD but also become a better, more skilled C#.NET software engineer!
You will feel great when you receive recognition for your clean, easy-to-read TDD-developed code!
What you will learn during this course:
- What is TDD? What is not TDD?
- Why should you learn TDD?
- How to set up your development environment
- What is unit testing?
- How does TDD work? What are its lifecycle and rules?
- How to apply TDD in practice
- You'll develop a realistic ShoppingCart class using TDD
And also:
- What is clean code, and how do you write it?
- Why should functions be small?
- How to create separation of concerns
- When and how to use exceptions
"I think it’s a must-go-to course for anyone in Software Engineering. I especially liked how it bridged the gap between TDD theory and practice. I highly recommend ‘Introduction to Test-Driven Development in C#’."
— Eugine Song, Developer
“Loved it! I learned heaps. Great hands-on session, thank you!”
— Kamal Lamgade, Developer
“I enjoyed this TDD course. I didn’t know that much about TDD beforehand. The explanations were clear and insightful. I gained an appreciation for TDD and how to write clean code.”
— Rahul Waghmare, Developer
Example Curriculum
- Task: Create Add() method (6:23)
- Solution: Create Add() method (1:53)
- Handle no product parameter (12:01)
- Quick detour into Exceptions (5:47)
- Message for MissingProduct exception (4:13)
- Quantity Is 0 (14:20)
- Quantity Is -1 (7:08)
- As the tests get more specific ... (8:39)
- InvalidQuantity Refactor (5:20)
- Starting on The Gold - 3 Apples test (11:23)
- Extend 3 Apples test (12:20)
- Extend 3 Apples test even further (7:00)
- Refactor 3 Apples test (9:49)
- 5 Bananas test (11:00)
- Refactor to theory and forward looking tests (9:29)
- Refactor Feature Envy (6:47)
- More Refactoring (5:34)
- Add two products into cart (5:09)
- Add two products and verify cart Total (4:28)
- Refactor Total calculation (3:56)
- Refactor two products unit test (7:58)
- Add three products into cart (5:01)
- Task: Create Remove() method
- Solution: Create Remove() method (1:44)
- Refine Requirements for Remove() (1:37)
- Removing from an Empty ShoppingCart? (5:23)
- Task: Write the next unit test
- Solution: Write the next unit test (2:53)
- Task: Remove Apples from Apple Cart
- Solution: Remove Apples from Apple Cart (4:57)
- Task: Write a forward-looking test for Remove()
- Solution: Write a forward-looking test for Remove() (3:19)
- Task: Write first test for Add() to throw ProductAlreadyInCart exception (2:49)
- Solution: Write first test for Add() to throw ProductAlreadyInCart exception (6:40)
- Task: Pass first test Add() throws ProductAlreadyInCart
- Solution: Pass first test Add() throws ProductAlreadyInCart (3:00)
- Task: Extend ProductAlreadyInCart with exception message
- Solution: Extend ProductAlreadyInCart with exception message (2:18)
- Task: Write next unit test for ProductAlreadyInCart exception
- Solution: Write next unit test for ProductAlreadyInCart exception (5:05)
- Task: Refactor unit tests for ProductAlreadyInCart
- Solution: Refactor unit tests for ProductAlreadyInCart (5:24)
- Requirements Change (1:22)
- Task: Change unit test to fit the new requirements
- Solution: Change unit test to fit the new requirements (3:07)
- Task: Implement merging quantities code
- Solution: Implement merging quantities code (3:05)
- Generalise unit test for other quantities (2:54)