Course
Skills
Advanced Unit Testing
Learn how to make unit tests work for you instead of against you.
What you'll learn
This course teaches you various advanced techniques for making unit tests more robust and easier to maintain. It assumes that you have prior experience with unit testing. You'll learn how to make the Arrange and Assert parts of your tests easier to read and maintain, as well as how to model unit tests to match the System Under Test, and how to make the System Under Test easier to unit test. Throughout the course you will see lots of code examples in C#.
Table of contents
DRY versus DAMP
25mins
Test Utility Code
59mins
- Introduction 0m
- Brittle Tests 2m
- Four-Phase Test 1m
- Demo Introduction: Motivating Example 1m
- Demo: Motivating Example 3m
- Demo Recap: Motivating Example 1m
- Fixture Setup Patterns 1m
- Test Data Builder 1m
- Object Mother 1m
- Fluent Builder 1m
- Demo Introduction: Test Data Builder 0m
- Demo: Test Data Builder 7m
- Demo Recap: Test Data Builder 2m
- SUT Factory 1m
- SUT Mother 0m
- SUT Builder 0m
- Demo Introduction: SUT Factory 0m
- Demo: SUT Factory 11m
- Demo Recap: SUT Factory 1m
- Auto-Mocking Container 1m
- Auto-Mocking Container code 1m
- Demo Introduction: Auto-Mocking Container 1m
- Demo: Auto-Mocking Container 6m
- Demo Recap: Auto-Mocking container 1m
- Fixture Object 1m
- Fixture Object code 1m
- Demo Introduction: Fixture Object 1m
- Demo: Fixture Object 11m
- Demo Recap: Fixture Object 1m
- Fixture Object and Test Data Builder Combined 1m
- Summary 1m
Structural Inspection
35mins
- Introduction 1m
- Verification Patterns 1m
- Testing Complex Systems 0m
- Complex versus Complicated 1m
- Traditional Introductions to TDD 1m
- Structural Inspection 2m
- Behavior Verification, Mostly 1m
- API Design Philosphy 1m
- Typical Reactions 2m
- Unit Testing 0m
- Proving that Discount Behaves Correctly 1m
- Basket Behavior Verification 1m
- Demo Introduction: Basket Data Flow 0m
- Demo: Basket Data Flow 2m
- Demo Recap: Basket Data Flow 0m
- Combining Knowledge 1m
- Demo Introduction: BasketTotalVistor Behavior 1m
- Demo: BasketTotalVisitor Behavior 10m
- Demo Recap: BasketTotalVisitor Behavior 1m
- Verifying a Facade 2m
- Demo Introduction: BasketPipeline Integration 1m
- Demo: BasketPipeline Integration 3m
- Demo Recap: BasketPipeline Integration 1m
- Too Enterprisey 1m
- Summary 1m
Identity
31mins
- Introduction 0m
- DAMP Result Verification 2m
- Identity Matters 1m
- Object Types 2m
- Value Objects 1m
- Unit Testing Value Object Equality 1m
- IEquatableT 1m
- Unit testing IEquatableT; 1m
- Structural Inspection without properties 1m
- Demo Introduction: Unit Testing Value Object Equality 0m
- Demo: Unit Testing Value Object Equality 8m
- Demo Recap: Unit Testing Value Object Equality 1m
- Unit testing Entity equality 1m
- Unit testing Service equality 1m
- Demo Introduction: Services with Value Object Identity 0m
- Demo: Services with Value Object Identity 9m
- Demo Recap: Services with Value Object Identity 1m
- Summary 1m
Test-Specific Identity
29mins
- Introduction 0m
- Equality Pollution 1m
- Comparer 1m
- Assertion Roulette? 1m
- Concrete Comparer 1m
- Refactored test 1m
- Interface Comparer 2m
- Refactored Test: Part2 2m
- Demo Introduction: Composite Compare 0m
- Demo: Composite Comparer 6m
- Demo Recap: Composite Compare 1m
- Resemblance 1m
- Unit test this method 1m
- Unit test with no DSL 1m
- Static Helper Method 1m
- Resemblance Revisited 2m
- Likeness 1m
- SemanticComparison 1m
- Unit testing MakeReservation 1m
- Likeness as Resemblance 2m
- Summary 1m
- Course Summary 1m