TypeMock.ArrangeActAssert Namespace

Typemock Isolator Developer Guide
Typemock.ArrangeActAssert is Typemock Isolator's Arrange, Act and Assert API namespace. Typemock Isolator can seamlessly fake concrete objects, which helps in Test Driven Development, without the need to refactor your code.
Classes

  ClassDescription
Public classArgs
Args is a helper class for creating and passing Value\Reference\Out arguments into a non-public invoked methods.
Public classIsolate
This is the entry point to all AAA APIs. Use it to fake, swap, set method behavior and verify calls. The Isolate APIs use fluent interfaces, thus
Public classCode exampleIsolatedAttribute
Used to clean up the defined expectations. This attribute can't be inherited.
Public classCode exampleNestedCallException
NestedCallException is thrown when a method call is used as an argument for a method inside a WhenCalled() statement

Examples

WhenCalled(() => A.B(C.D())).IgnoreCall; // will throw NestedCallException
Instead you should do:
var argument = C.D();
WhenCalled(() => A.B(argument)).IgnoreCall()
Public classCode exampleUseCultureAttribute
Sets the current culture for the duration of a test.

The culture remains set until the test completes and is then reset to its original value.

Examples

[TestClass]
public TestClass
{
    [TestMethod, UseCulture("fr-FR")]
    public void MyTest()
    {
        // the test code
    }
}
Enumerations

  EnumerationDescription
Public enumerationCode exampleBaseConstructorWillBe
A behavior setting on how the base object's constructor behaves
Public enumerationCode exampleConstructorWillBe
A behavior setting that states how the fake object's constructor will behaves.
Public enumerationDesignMode
The two different design modes available for mocking:
  • Pragmatic. The default Pragmatic mode allows faking any type and method, including sealed, static or private.
  • InterfaceOnly. This mode allows faking only abstract or interface types, and public non-virtual methods. Otherwise it throws a Typemock.DesignModeException.
Public enumerationMembers
A behavior setting on how the fake object is created.