Autoplay
Autocomplete
Previous Lesson
Complete and Continue
Introduction to Test-Driven Development in C#
Introduction
Welcome (2:15)
Software Development Approaches
Traditional Development (4:07)
Tests After Development (2:50)
Test-Driven Development (2:12)
Unit Testing
What are Unit Tests? (3:25)
A Simple Example (3:05)
Arrange / Act / Assert (2:26)
Another Example (5:57)
How TDD works
The 3 Rules Of TDD (3:02)
Red / Green / Refactor (3:39)
The Thorns and The Gold (4:37)
TDD Summary Sheet
TDD Setup
Setting up your Development Environment (10:52)
Example: Build a Shopping Cart
The Requirements (1:54)
Let's do some design (4:21)
Construct the ShoppingCart
Create ShoppingCart (6:49)
Recap & What's the next test? (3:48)
Test for Empty Cart (9:37)
Zero Total Test for Empty Cart (6:49)
Add Item to ShoppingCart
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)
Clear All Items from ShoppingCart
Task: Create Clear() method
Solution: Create Clear() method (2:28)
Task: Write Clear() behaviour
Solution: Write Clear() behaviour (7:46)
Remove an Item from the ShoppingCart
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)
Refine the Add() method
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)
Wrap up & Conclusion
Recap (13:24)
Wrap-up (4:25)
Solution: Create Remove() method
Lesson content locked
If you're already enrolled,
you'll need to login
.
Enroll in Course to Unlock