Before taking the Course
  • How to Ask Questions
  • Download Source Code and Slides
  • English Subtitles
  • Join .NET Community of Students
Getting Started
  • Outline
  • What is a Unit Test?
  • Unit-Testing Frameworks
  • Your First Unit Test
  • Naming Conventions
  • Running and Debugging Unit Tests
  • Benefits of Unit Testing
  • Who Should Write Unit Tests and When
  • Programmer's Oath
  • Exercise: Degree Converter
  • Solution: Degree Converter
  • Conclusion
NUnit Framework
  • Outline
  • Assert Introduction
  • Assert Demo
  • Arrange-Act-Assert
  • Running Tests from the Console
  • SetUp and TearDown
  • OneTimeSetUp and OneTimeTearDown
  • Parameterized Unit Tests
  • Grouping and Ignoring Unit Tests
  • Code Coverage
  • Exercise: FizzBuzz
  • Solution: FizzBuzz
  • Exercise: Roman Numerals
  • Solution: Roman Numerals
  • Exercise: Stack
  • Solution: Stack
  • Conclusion
Test Doubles
  • Test Doubles and Dependency Injection
  • Outline
  • Demo of a Testing Problem
  • Refactoring to Make Code Testable
  • Test Doubles
  • Hand Rolled or Manual Test Doubles
  • Problems with Manual Test Doubles
  • Mocking Frameworks
  • Writing Unit Tests with a Mocking Framework
  • NSubstitute Mocking Framework. Key Features. Demo
  • Detroit School vs London School of Unit Testing
  • Conclusion
Test-Driven Development
  • Outline
  • What is TDD?
  • Red \ Green \ Refactor
  • TDD and Design Upfront
  • Regular Agile Process in 200 Words
  • VS and R# Shortcuts
  • Refactoring Commands Built-In VS 2017
  • Fibonacci Numbers
  • Three Main TDD Techniques
  • Grabbing the Gold
  • FizzBuzz
  • Reading Roman Numerals
  • UpdateableSpin
  • Continuous Testing
  • Tic-Tac-Toe (Crosses and Noughts)
  • Assert First
  • TDD Demo - Game in Sticks
  • Conclusion
Best Practices of Unit Testing
  • Outline
  • Do Unit Tests Guarantee the Success?
  • Pragmatic Unit Testing
  • Integration Tests
  • Singletons and Static Classes
  • Header Interfaces
  • Demo of Refactoring to a Testable Design
  • How Much Test Coverage is Enough?
  • Testing Trivial Code
  • The Rule of Testing a Single Concern
  • More on Best Practices
  • Generating Unit Test Method Signatures
  • Conclusion
  • Final Quiz
  • BONUS LECTURE
Appendix. Intro to Dependency Injection
  • Outline
  • Definition of DIP
  • Dependencies
  • Volatile and Stable Dependencies
  • Definition of IoC and DI
  • DIP Violation Demo
  • Refactoring to a Better Design
  • Dependency Injection Techniques
  • Architectural Implications
  • Common Smells of DIP Violation
  • Conclusion
Appendix. Intro to DI. IoC-Containers
  • Outline
  • Pure DI and IoC-Containers
  • Building a Simple IoC-Container