IMockControlAlwaysThrow Method

Typemock Isolator Developer Guide
Expect unlimited calls from method, and always throws exception

Namespace:  TypeMock
Assembly:  TypeMock (in TypeMock.dll) Version: 9.3.6.0 (9.3.6.0)
Syntax

IParameters AlwaysThrow(
	string method,
	Exception ex,
	params Type[] genericTypes
)

Parameters

method
Type: SystemString
Method Name
ex
Type: SystemException
Mocked exception
genericTypes
Type: SystemType
List of generic types, to mock bounded generic methods

Return Value

Type: IParameters
Can Check Parameters, see IParameters
Exceptions

ExceptionCondition
TypeMockExceptionIf method is not found
Remarks

This is overridden with the limited call methods. ie. when AlwaysThrow(String, Exception, Type) is used together with ExpectAndReturn(String, Object, Type) then the first value returned will be the ExpectAndReturn(String, Object, Type) values then the method will throw the AlwaysThrow(String, Exception, Type) value
See Also

Reference