Try to run this test
using MbUnit.Framework;
using TypeMock;
namespace TypeMockBug
{
[TestFixture]
public class MatrixTest
{
[TestFixtureSetUp]
public void TestFixtureSetUp()
{
MockManager.Init();
}
[TearDown]
public void TearDown()
{
MockManager.Verify();
}
[Test]
public void FirstTest()
{
ISomething mockSomething = (ISomething) RecorderManager.CreateMockedObject(typeof(ISomething));
}
}
public interface ISomething
{
double[,] GetMatrix();
}
}
this is the exception
MatrixTest.FirstTest.TearDown
TestCase 'MatrixTest.FirstTest.TearDown'
failed: Method GetMatrix in type MockISomething from assembly DynamicMockAssembly, Version=0.0.0.0 does not have an implementation.
System.TypeLoadException
Message: Method GetMatrix in type MockISomething from assembly DynamicMockAssembly, Version=0.0.0.0 does not have an implementation.
Source: mscorlib
StackTrace:
at System.Reflection.Emit.TypeBuilder.TermCreateClass(TypeToken handle, Module module)
at System.Reflection.Emit.TypeBuilder.CreateType()
at u.a(Type A_0, Object[] A_1)
at TypeMock.MockManager.MockObject(Type type, Constructor mockConstructors, Object[] args)
at TypeMock.MockManager.MockObject(Type type, Object[] args)
at TypeMock.RecorderManager.CreateMockedObject(Type typeToMock)
c:sviluppo ypemockbug ypemockbugmatrixtest.cs(25,0): at TypeMockBug.MatrixTest.FirstTest()