Assessment Answers

The answers to the practice questions for each chapter:

Chapter 1

  1. No.
  2. Long methods are indicators that a method handles too many responsibilities and should be split.
  3. Yes; by targeting .NET Standard, you can reach multiple runtime versions, including .NET Core and .NET Framework.
  4. A code smell represents a potential design flaw that could benefit from being rewritten.

Chapter 2

  1. Yes, it is true.
  2. To test a unit of code, such as the logical code path of a method.
  3. 3. As small as possible. A unit test aims at testing the smallest possible unit of code in isolation.
  4. Integration tests are usually used for that kind of task.
  5. No, there are multiple ways of writing code, TDD being only one of them.

Chapter 3

  1. Five: S.O.L.I.D. (SRP, ...

Get An Atypical ASP.NET Core 5 Design Patterns Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.