The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This documentation is archived and is not being maintained.
PexAssume Class
Static class to express assumptions, i.e. a precondition, in parameterized unit tests. The methods of this class can be used to filter out undesirable test inputs.
If the assumed condition does not hold for some test input, a PexAssumeFailedException is thrown, which will cause the test to be silently ignored.
Namespace:
Microsoft.Pex.Framework Assembly:
Microsoft.Pex.Framework (in Microsoft.Pex.Framework.dll)
except that a failing PexAssume results in no test cases, whereas in the case of an if-statement, Pex would generate a separate test case to cover the then-branch of the if-statement.
PexAssume also contains specialzed nested classes for assumptions on string, arrays and collections.