MockScope Class

Typemock Isolator Developer Guide
Create a new instance of the MockScope that will activate the mock verification process on its dispose.
Inheritance Hierarchy

SystemObject
  TypeMockMockScope

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

public class MockScope : IDisposable

The MockScope type exposes the following members.

Constructors

  NameDescription
Public methodMockScope
Create a new instance of the MockScope that will activate the mock verification process on its dispose.
Public methodCode exampleMockScope(Int32)
Initializes a new instance of the MockScope class, that will call the VerifyWithTimeout with the given timeout.
Top
Methods

  NameDescription
Public methodDispose
Activate the verification process
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 methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

Examples

[Test]
 void TestMethod1()
 {
    using (new MockScope())
    {
        //The Test code
    }
 }
See Also

Reference