Writing unit tests
In this section, we will look at how you can write unit tests for your C# code. To do so, we will consider the following implementation of a rectangle:
public struct Rectangle { public readonly int Left; public readonly int Top; public readonly int Right; public readonly int Bottom; public int Width => Right - Left; public int Height => Bottom - Top; public int Area => Width * Height; public Rectangle(int left, int top, int right, int bottom) { Left = left; Top = top; Right = right; Bottom = bottom; } public...