PexAssume 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.
A static helper class that contains a set of methods to express preconditions in parameterized unit tests.
public ref class PexAssume abstract sealed
[__Instrument]
public static class PexAssume
[<__Instrument>]
type PexAssume = class
Public Class PexAssume
- Inheritance
-
PexAssume
- Attributes
-
__InstrumentAttribute
Remarks
The PexAssume
methods can be used to filter out undesirable test inputs. If the specified condition does not hold for a test input, IntelliTest throws PexAssumeFailedException and silently ignores the test.
Methods
AreEqual(Boolean, Boolean, String, Object[]) |
Assumes that two |
AreEqual(Boolean, Boolean, String) |
Assumes that two |
AreEqual(Boolean, Boolean) |
Assumes that two |
AreEqual(Double, Double, Double, String, Object[]) |
The test case fails if two |
AreEqual(Double, Double, Double, String) |
The test case fails if two |
AreEqual(Double, Double, Double) |
The test case fails if two |
AreEqual(Object, Object, String, Object[]) |
The test fails if two object instances are not equal, with a specified message in the exception object. |
AreEqual(Object, Object, String) |
The test fails if two object instances are not equal, with a specified message in the exception object. |
AreEqual(Object, Object) |
The test fails if two object instances are not equal. |
AreEqual(Single, Single, Single, String, Object[]) |
The test case fails if two |
AreEqual(Single, Single, Single, String) |
The test case fails if two |
AreEqual(Single, Single, Single) |
The test case fails if two |
AreEqual(String, String, Boolean, CultureInfo, String, Object[]) |
The test fails if a culture-specific comparison of two strings is false, with a specified message in the exception object. |
AreEqual(String, String, Boolean, CultureInfo, String) |
The test fails if a culture-specific comparison of two strings is false, with a specified message in the exception object. |
AreEqual(String, String, Boolean, CultureInfo) |
The test fails if a culture-specific comparison of two strings is false. |
AreEqual(String, String, Boolean, String, Object[]) |
The test case fails if two strings are not equal, with a specified message in the exception object. |
AreEqual(String, String, Boolean, String) |
The test case fails if two strings are not equal, with a specified message in the exception object. |
AreEqual(String, String, Boolean) |
The test case fails if two strings are not equal. |
AreEqual<T>(T, T, String, Object[]) |
The test fails if two object instances of a specified type are not equal, with a specified message in the exception object. |
AreEqual<T>(T, T, String) |
The test fails if two object instances of a specified type are not equal, with a specified message in the exception object. |
AreEqual<T>(T, T) |
The test fails if two object instances of a specified type are not equal. |
BooleanIsZeroOrOne(Boolean) |
Assumes that a boolean value is either zero or one |
CreateException() |
Creates the assumption/assertion exception instance |
EnumIsDefined<TEnum>(TEnum) |
The test fails if the value is not defined in the specified enumeration. |
Fail() |
The test case failes unconditionally. |
Fail(String, Object[]) |
The test case failes unconditionally, with a specified message in the exception object. |
Fail(String) |
The test case failes unconditionally, with a specified message in the exception object. |
IsNotNull(Object, String, Object[]) |
The test case fails if the value is a null reference, with a specified message in the exception object. |
IsNotNull(Object, String) |
The test case fails if the value is a null reference, with a specified message in the exception object. |
IsNotNull(Object) |
The test case fails if the value is a null reference. |
IsNotNullOrEmpty(String) |
The test fails if a specified string is null or empty. |
IsNull(Object, String, Object[]) |
The test case fails if the value is not a null reference, with a specified message in the exception object. |
IsNull(Object, String) |
The test case fails if the value is not a null reference, with a specified message in the exception object. |
IsNull(Object) |
The test case fails if the value is not a null reference. |
IsNullOrEmpty(String) |
The test fails if a specified string is not null or empty. |
IsTrue(Boolean, String, Object[]) |
The test case fails if the condition evaluates to |
IsTrue(Boolean, String) |
The test case fails if the condition evaluates to |
IsTrue(Boolean) |
The test case fails if the condition evaluates to |
IsTrue<T>(Boolean, PexAssume.Func<T>) |
The test case fails if the condition evaluates to |