Flags that define the behavior of Arbitrary (not expected) calls. The default is the Methods of Abstract and Interfaces are Strict and Arbitrary calls fail
while Arbitrary Methods of concrete classes are allowed.
Namespace: TypeMock
Assembly: TypeMock (in TypeMock.dll) Version: 9.3.6.0 (9.3.6.0)
Syntax
Members
Member name | Value | Description | |
---|---|---|---|
AllMethods | 3 | All methods are strict and if an arbitrary method is called the test will fail This is equivalent to : StrictFlags.InstanceMethods | StrictFlags.StaticMethods | |
InstanceMethods | 1 | Instance methods are strict and if an arbitrary instance method is called the test will fail | |
StaticMethods | 2 | Static methods are strict and if an arbitrary static method is called the test will fail | |
MethodsOfAbstractTypes | 16 | This is the default. Methods of Abstract classes and Interfaces are Strict and Arbitrary calls fail while Arbitrary Methods of concrete classes are allowed. | |
ArbitraryMethodsAllowed | 0 | Methods are not strict and arbitrary methods are allowed |
Remarks
![]() |
---|
When allowing arbitrary abstract methods (methods created dynamically by Typemock Isolator using MockObject(Type, Object) or CreateMockedObject(Type)), Typemock Isolator create the following default behavior: 1. All void calls just return 2. Other Methods will return 0 or null depending on the return type 3. Properties will behave like normal properties |
![]() |
---|
To set only one method to strict use: MethodSettings(String) or FailWhenCalled |
See Also