As we already know, in a Silverlight business application, we will have code on both client-side and server-side. The first one will be based on the .NET Framework, and the second one, on Silverlight. To make concept assimilation easier, we will first talk about testing on .NET 4.0, then, we will deal with particular cases in Silverlight where we will apply the concepts previously seen.
Tests will have to be grouped into a test project, which is a special kind of project Visual Studio executes to check test results (or MSBuild, if we are in a context of continuous integration). In order to generate this project, we have to select Test as the template from the Installed Templates list, and then Test Project, as shown in the following screenshot:
Give a name to the project (in this example, ReservationsTest) and it will generate a simple structure similar to the following screenshot:
This includes the reference to the MSTest test library, as...