MockExpectSetAndThrow Method (String, Exception, Int32)

Typemock Isolator Developer Guide
Expect a number of sets of a Property and mock throwing an exception

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

public IPropertyParameters ExpectSetAndThrow(
	string property,
	Exception ex,
	int timesToRun
)

Parameters

property
Type: SystemString
Property Name
ex
Type: SystemException
Mocked Exception
timesToRun
Type: SystemInt32
Number of times to expect the call

Return Value

Type: IPropertyParameters
Can Check Property value, see IPropertyParameters

Implements

IMockControlExpectSetAndThrow(String, Exception, Int32)
Exceptions

ExceptionCondition
TypeMockExceptionIf property is not found
See Also

Reference