Hi,
I encountered a problem in mocking an interface which implements a .NET interface and 1 of our own interfaces.
public interface NewInterface: IBusinessObject, INotifyPropertyChanged
MockObject<NewInterface> mock = MockManager.MockObject<NewInterface>();
mock.ExpectAddEvent("PropertyChanged");
This throws
System.InvalidCastException : Unable to cast object of type 'TypeMock.MockObject`1[Interfaces.IBusinessObject]' to type 'TypeMock.MockObject`1[Interfaces.NewInterface]'.
at TypeMock.MockManager.MockObject[TMockedType]()
at Tests.TestAddEvent()
The weird part is that it not every time it throws the exception.
Im running Isolator 4.3.2 and running tests through NCover