Book Image

Visual Studio 2013 and .NET 4.5 Expert Cookbook

Book Image

Visual Studio 2013 and .NET 4.5 Expert Cookbook

Overview of this book

Table of Contents (14 chapters)
Visual Studio 2013 and .NET 4.5 Expert Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Understanding Visual Studio unit test projects


Writing a test project inside the Visual Studio IDE has never been easier than that in Visual Studio 2013. A lot of tools inside the IDE makes it very easy to work on unit testing for an existing project and write superior test cases for the application. Microsoft has invested special efforts to make testing inside Visual Studio 2013 seamless for a developer who is already aware of how to write code inside Visual Studio. For instance, rather than running the project in the debugging mode, Visual Studio also provides shortcuts to build a project and run tests on it simultaneously. Now, let's see how to test an application inside Visual Studio in simple terms.

Getting ready

Before writing the actual test projects, let's first define a class that we need to test. For simplicity, let's consider a simple class called Salary, which will get the salary of an employee based on certain logic around his age. To implement, let's Open Visual Studio 2013 and...