I'm getting an exception TypeLoadException was unhandled:
Method 'get_InternalMessageId' on type 'Mock0000MailItem' from assembly 'DynamicMockAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=a0857b23fb3f20d9' is overriding a method that is not visible from that assembly.
The code to reproduce this is:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Exchange.Data.Transport;
using TypeMock.ArrangeActAssert;
namespace type_mock{
class Program{
static void Main (string [] args){
MailItem item;
item = Isolate.Fake.Instance<MailItem> ();}}}
The class being faked is Microsoft.Exchange.Data.Transport.MailItem by Microsoft version 8.0.681.0 I obviously won't be able to use InternalsVisibleTo since this is a third party assembly.
Is there any way for TypeMock to mock this class?