Released TypeMock 4.0 Beta

We have released a beta version of TypeMock 4.0, this should be a really stable version. We intend to release the final version within 2 weeks.

There is a lot of new stuff in this version. you can read about it in the Release Notes.

Some nice stuff are:

The new TypeMock Decorators.

Using these decorators will work for All test frameworks and will automatically verify mocks

[Test] [VerifyMocks(Timeout=150)] // mocks are always verified public void TestVerificationWithTimeout() { // setup mocks // run tests // optional assert Assert.That(): }

Generic Reflective API

Use generic to create reflective mocks.

[Test] [VerifyMocks] // mocks are always verified public void Test() { Mock mockControl = MockManager.Mock<ClassToMock>(); new ClassToMock(); // This is mocked }

Intelligent Natural Mocks

When creating a mocked return value, within a recording block, TypeMock.NET will not mock the return value

using (RecordExpectations recorder = RecorderManager.StartRecording()) { MockedType.CallAMethod(); recorder.Return(new SomeReturnType(1,2));// SomeReturnType is NOT mocked }

Add Comment

Required fields are marked *. Your email address will not be published.