Visual Studio Team System
Generic Test Sample

Download sample

The "EvenOdd" sample is a project that you can build into a simple program. You can then wrap this program as a generic test. The files of this sample are provided for the following walkthrough: Walkthrough: Creating and Running a Generic Test.

NoteNote

For general information about how to use samples, see How to: View and Download Samples.

About the EvenOdd Sample Program

The EvenOdd sample is a Visual C# console application. It returns a value of either 1 or 0, depending on the argument you pass it:

  • If you pass no argument, the program returns 0 if the seconds field of the current system time is even, and 1 if the value of the seconds field is odd.

  • If you pass a single numeric argument, the program returns 0 if the number you pass is even, 1 if that number is odd. If you pass a non-numeric argument, the program returns 1. This causes the generic test that wraps the program to produce a Failed result.

  • If you pass two arguments, the program returns 0 if the second argument represents a file that exists in the same directory as the program; otherwise, it returns 1.

  • All other cases will fail.



Community Content

paul9955
About the Generic Test Sample Download

Downloads for both the unit test sample (Woodgrove Bank) and the generic test sample (EvenOdd) have been posted to new locations. For more information, see the following blog posts:

Unit Test Sample is Now Downloadable
http://blogs.msdn.com/vstsue/archive/2006/04/13/575468.aspx

Generic Test Sample Is Now Downloadable
http://blogs.msdn.com/vstsue/archive/2006/04/13/575455.aspx

Tags :

Page view tracker