MockManager Methods

Typemock Isolator Developer Guide

The MockManager type exposes the following members.

Methods

  NameDescription
Public methodStatic memberCalledCounter(String, String)
Return the amount of times a method has been called
Public methodStatic memberCalledCounter(Type, String)
Return the amount of times a method has been called
Public methodStatic memberCalledCounter(Type, String, Type)
Return the amount of times a method has been called
Public methodStatic memberCalledCounterTMockType(String)
Return the amount of times a method has been called
Public methodStatic memberCalledCounterTMockType(String, Type)
Return the amount of times a method has been called
Public methodStatic memberCalledIndexerCounter
Return the amount of times an indexer has been called
Public methodStatic memberCalledPropertyGetCounter
Return the amount of times a property has been called
Public methodStatic memberCalledPropertySetCounter
Return the amount of times a property has been set
Public methodStatic memberClearAll
Clears all expectations and mocks
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodStatic memberGetInstanceMocks(Type)
Returns a list of instance mocks of a type
Public methodStatic memberGetInstanceMocksTMockedType
Returns all instance mocks for TMockedType
Public methodStatic memberGetMockAll(Type)
Returns the mock for all instances of a type, or null if it is not mocked
Public methodStatic memberGetMockAllTMockedType
Returns all instances mock of TMockedType
Public methodStatic memberGetMockedTypes
Returns all types that are mocked
Public methodStatic memberCode exampleGetMockOfT
Returns the mock associated with a specific instance
Public methodStatic memberGetMocks
Returns all mocks
Public methodStatic memberGetMocks(Type)
Returns all mocks for a type
Public methodStatic memberGetMocksTMockedType
Returns all mocks for TMockedType
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberInit
Defaults to collect call information ONLY for mocked classes and not verbose
Public methodStatic memberInit(Boolean)
Manually set Call Collection and verbose behaviors
Public methodStatic memberIsTypeMocked(Type)
Check if a type is mocked (with MockAll or instance mocks)
Public methodStatic memberIsTypeMockedTMockedType
Check if a type is mocked (with MockAll or instance mocks)
Public methodStatic memberIsTypeMockedAll(Type)
Check if a type is mocked for all instances
Public methodStatic memberIsTypeMockedAllTMockedType
Check if a type is mocked for all instances
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberMock(Type)
Automatically mock constructors as well, i.e. constructor code will NOT be called
Public methodStatic memberMock(Type, Boolean) Obsolete.
Create a new Type Mock to intercept and mock calls made on the next instance of a type, with ability to decide if Constructors should be mocked or not (default is to mock constructors)
Public methodStatic memberMock(Type, Constructor)
Create a new Type Mock to intercept and mock calls made on the next instance of a type, with ability to define the scope of mocked Constructors (default is to mock all constructors)
Public methodStatic memberMockTMockedType
Intercept and mock calls made on the next new instance of TMockedType.
Public methodStatic memberMockTMockedType(Constructor)
Intercept and mock calls made on the next new instance of TMockedType, with constructor behavior control
Public methodStatic memberMockAll(Type)
Automatically mock constructors as well, i.e. constructor code will NOT be called
Public methodStatic memberMockAll(Type, Boolean)
Create a new Type Mock for all instances of the type, with ability to decide if Constructors should be mocked or not
Public methodStatic memberMockAll(Type, Constructor)
Create a new Type Mock for all instances of the type, with ability to to define the scope of mocked Constructors (default is to mock all constructors)
Public methodStatic memberMockAllTMockedType
Intercept and mock calls made on the all instance of TMockedType.
Public methodStatic memberMockAllTMockedType(Constructor)
Intercept and mock calls made on the all instance of TMockedType, with constructor behavior control
Public methodStatic memberMockGlobalFunctions
Use this type when mocking global functions
Public methodStatic memberMockObject(Type, Boolean) Obsolete.
Create a new Dynamic Mock Object with ability to decide if Constructors should be mocked or not
Public methodStatic memberCode exampleMockObject(Type, Object)
Automatically mock constructors as well, i.e. constructor code will NOT be called
Public methodStatic memberMockObject(Type, Constructor, Object)
Create a new Dynamic Mock Object with ability to define the scope of mocked Constructors (default is to mock all constructors)
Public methodStatic memberMockObjectTMockedType
Create an instance of TMockedType and mock calls made on the instance.
Public methodStatic memberMockObjectTMockedType(Object)
Create an instance of TMockedType and mock calls made on the instance, while sending constructor arguments
Public methodStatic memberMockObjectTMockedType(Constructor)
Create an instance of TMockedType and mock calls made on the instance, while controlling the constructor
Public methodStatic memberMockObjectTMockedType(Constructor, Object)
Create an instance of TMockedType and mock calls made on the instance, while controlling the constructor and sending constructor arguments
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberVerify
Verify all mocked types
Public methodStatic memberVerifyWithTimeout
Wait with timeout (5 seconds) for all expected methods to be called
Public methodStatic memberVerifyWithTimeout(Int32)
Wait with timeout (im milliseconds) for all expected methods to be called
Top
See Also

Reference