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...