Verifying your code with unit tests


show more Verifying your code with unit tests provides you with in-depth training on Developer. Taught by Walt Ritscher as part of the Visual Studio 2010 Essential Training show less
please wait ...

Verifying your code with unit tests

This chapter is about unit testing, which is a very developer-centric type of test. Let me start with my definition of a unit test. A unit test is an automated chunk of code that calls a class or a method and verifies that our assumptions about the behavior of the code under test are correct. Unit tests are commonly written using a unit testing framework. They should always be automated and easily accessible. Anyone on your team should be able to run the unit tests at anytime to verify that the code under test is working, and that no one has broken the build. Let's look at the unit testing tools inside Visual Studio.

I am going to be working with this project called WorkingWithUnitTests. First, let me show you the code I am going to test. It's inside this Book class Double-click on the Book class and you'll see that this class has one property called Title, one property with a getter and a setter, and a property called Price, and then I have two methods: UpdatePrizeByPercent a...

Verifying your code with unit tests
Video duration: 8m 58s 8h 9m Intermediate

Viewers:

Verifying your code with unit tests provides you with in-depth training on Developer. Taught by Walt Ritscher as part of the Visual Studio 2010 Essential Training

please wait ...