English
Topic 18. Unit testing and code refactoring
Goal: become familiar with unit testing in .NET and code refactoring; learn to create MSTest test projects, write tests according to the Arrange–Act–Assert pattern, use parameterized tests, boundary values, and test doubles, develop code through testing, and refactor under the protection of tests.
Lecture contents
- Tests and MSTest — Why tests are needed · Frameworks and solution structure · The first test in MSTest
- Running tests, isolation, TDD, and coverage — Running tests · Isolating dependencies · Test-driven development · Code coverage
- Refactoring — Refactoring
- Examples and common mistakes — Example programs · Common mistakes