Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Test Types
 Generic Test Sample
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
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   What is Community Content?
Add new content RSS  Annotations
About the Generic Test Sample Download      paul9955   |   Edit   |   Show History

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 What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker