 | ErrorTesterTest Method |
Tests that an action causes a specified exception.
Namespace: Capgemini.CommonObjectUtils.TestingAssembly: Capgemini.CommonObjectUtils (in Capgemini.CommonObjectUtils.dll) Version: 1.3.0.0
Syntaxpublic ErrorTester Test(
Type expectedException,
Action action
)
Public Function Test (
expectedException As Type,
action As Action
) As ErrorTester
public:
ErrorTester^ Test(
Type^ expectedException,
Action^ action
)
member Test :
expectedException : Type *
action : Action -> ErrorTester
Parameters
- expectedException
- Type: SystemType
The type of exception that is expected. - action
- Type: SystemAction
The action to perform.
Return Value
Type:
ErrorTesterThe ErrorTester for chaining calls.
ExceptionsException | Condition |
---|
ErrorTestException |
Either no exception was thrown by the action or the exception was a different type to the expected one.
|
See Also