Unit testing with Visual Studio 2017
As we have already discussed this new feature, its configuration settings, and the way to start and stop live unit testing, let's begin demonstrating with a live example. Let's first create a console application for a demo.
Getting started with configuring the testing project
Open your Visual Studio 2017 IDE, go to File | New | Project
| Console App (.NET Framework)
as the project template. Create the project by giving it a name (in this example, we are naming it ConsoleApp
).
Now, create a class named Person
and inherit it from the ICloneable
interface (just for this demonstration). Implement the interface to generate a Clone()
method, which will by default throw NotImplementedException
. Leave it as it is; we are going to revisit this method later. Add few string properties named ID
, Name
, and Address
. Here's the implementation of the class, for reference:
public class Person : ICloneable { public string ID { get; set; } public string...