StrictFlags Enumeration

Typemock Isolator Developer Guide
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

public enum StrictFlags
Members

  Member nameValueDescription
AllMethods3 All methods are strict and if an arbitrary method is called the test will fail This is equivalent to : StrictFlags.InstanceMethods | StrictFlags.StaticMethods
InstanceMethods1 Instance methods are strict and if an arbitrary instance method is called the test will fail
StaticMethods2 Static methods are strict and if an arbitrary static method is called the test will fail
MethodsOfAbstractTypes16 This is the default. Methods of Abstract classes and Interfaces are Strict and Arbitrary calls fail while Arbitrary Methods of concrete classes are allowed.
ArbitraryMethodsAllowed0 Methods are not strict and arbitrary methods are allowed
Remarks

When testing for mock interactions there are times when the default behavior needs to be changed, the StrictFlags define which arbitrary methods we allow.
Note Note
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
See Also

Reference