domingo, 6 de febrero de 2011

Unit tests

Unit tests are used to exercise other source code by directly calling the methods of a class, passing appropriate parameters, and then, if you include Assert statements, they can test the values that are produced against expected values. Unit test methods reside in test classes, which are stored in source code files.

You can generate unit tests by using a dialog box reached through Visual Studio tools windows. Each unit test is created as a C#, Visual Basic, or Visual C++ method. Its code and attributes reside in a source file in a test project of the same language. The new test targets the specific code you want tested. You can generate a single unit test for an individual method, multiple tests for methods that you select, or multiple tests for all the methods in a class or namespace.

References: http://msdn.microsoft.com/en-us/library/ms243171.aspx

No hay comentarios:

Publicar un comentario