Getting Started
  • What is Automated Testing
  • Benefits of Automated Testing
  • Types of Tests
  • Test Pyramid
  • The Tooling
  • Source Code
  • Writing Your First Unit Test
  • Testing All the Execution Tests
  • Refactoring with Confidence
  • Using NUnit in Visual Studio
  • What is Test-Driven Development
  • Course Structure
  • Summary
  • Asking Questions
Fundamentals of Unit Testing
  • Introduction
  • Characteristics of Good Unit Tests
  • What to Test and What Not to Test
  • Naming and Organizing Tests
  • Introducing Rider
  • Writing a Simple Unit Test
  • Black-box Testing
  • Set Up and Tear Down
  • Parameterized Tests
  • Ignoring Tests
  • Writing Trustworthy Tests
  • Developers Who Don't Write Tests
  • Summary
Core Unit Testing Techniques
  • Introduction
  • Testing Strings
  • Testing Arrays and Collections
  • Testing the Return Type of Methods
  • Testing Void Methods
  • Testing Methods that Throw Exceptions
  • Testing Methods that Raise an Event
  • Testing Private Methods
  • Code Coverage
  • Testing in the Real-world
  • Summary
Exercises
  • 19- Exercise- FizzBuzz
  • 20- Solution- FizzBuzz
  • Exercise- DemeritPointsCalculator
  • Solution- DemeritPointsCalculator
  • Exercise- Stack
  • Solution- Stack
Breaking External Dependencies
  • Introduction
  • Loosely-coupled and Testable Code
  • Refactoring Towards a Loosely-coupled Design
  • Dependency Injection via Method Parameters
  • Dependency Injection via Properties
  • Dependency Injection via Constructor
  • Dependency Injection Frameworks
  • Mocking Frameworks
  • Creating Mock Objects Using Moq
  • State-based vs. Interaction Testing
  • Testing the Interaction Between Two Objects
  • Fake as Little As Possible
  • An Example of a Mock Abuse
  • Who Should Write Tests
Exercises
  • Exercise- VideoService
  • Refactoring
  • Testing
  • Exercise- InstallerHelper
  • Refactoring InstallerHelper
  • Testing InstallerHelper
  • Exercise- EmployeeHelper
  • Refactoring EmployeeController
  • Testing EmployeeController
Project- Testing BookingHelper
  • Introduction
  • Test Cases
  • Extracting IBooking Repository
  • Writing the First Test
  • Refactoring
  • Writing the Second Test
  • Fixing a Bug
  • Writing Additional Tests
Project- HouseKeeperHelper
  • Introduction
  • Refactoring For Testability
  • Fixing a Design Issue
  • An Alternative Solution
  • Writing the First Interaction Test
  • Keeping Tests Clean
  • Testing a Method is Not Called
  • Another Interaction Test
  • Extracting Helper Methods
  • Testing Exceptions
  • Coupons to My Other Courses