PexChoose Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Supplies auxiliary input values to a test method.
public ref class PexChoose abstract sealed
[__Instrument]
public static class PexChoose
[<__Instrument>]
type PexChoose = class
Public Class PexChoose
- Inheritance
-
PexChoose
- Attributes
-
__InstrumentAttribute
Remarks
PexChoose
methods do not determine whether a test passes or fails, they simply specify input values. You must still use PexAssume and PexAssert to restrict input values and define whether a test passes or fails.
All PexChoose
methods have a user-defined assigned name, which is used for purposes such as column headings in a parameter table. Some methods take a "short" name which is passed to a user-implemented object that supports INamed
. The object converts the short name into a full name that is then used by Pex. The object could be used, for example, to create a scoped name from a short name, such as converting shortName to A.B.shortName.
Methods
Array<T>(String, Int32) |
Gets an array of a specified type and length. |
CreateDelegate<TDelegate>() |
Creates a delegate of type |
EnumValue<T>(String) |
Gets a value from a specified |
IndexValue<T>(String, T[]) |
Gets an index value from a specified array. |
ThrowMaybe(String, PexChooseExceptionFactory[]) |
Allows IntelliTest to throw one of the exceptions provided by a list of exception factories. |
ThrowMaybe(String, Type[]) |
Allows IntelliTest to throw an exception from a list of exception types. |
ThrowMaybe<TException>(String) |
Allows IntelliTest to throw an exception of a specified type. |
TryCreateDelegate(TypeEx, Delegate) |
Attempts to create a delegate of a specified type. |
Value<T>(String, Boolean, Boolean, Type[]) |
Gets a value from an argument list that is compatible with the specified type. |
Value<T>(String) |
Gets a value of a specified type. |
ValueFrom<T>(String, T[]) |
Gets a value from an argument list. |
ValueFromRange(String, Int32, Int32) |
Gets an integer from a specified range. |
ValueNotNull<T>(String) |
Gets a non-null value of a specified type. |