I am unable to mock interfaces that contain a method with an `in` parameter. When running the following code snippet, the result is an exception:
Message:
Test method Example.UnitTests.UnitTest.TestMethod threw exception:
Telerik.JustMock.Core.MockException: Abstract type 'Example.UnitTests.InParamExample' is not accessible for inheritance.
Stack Trace:
MocksRepository.Create(Type type, MockCreationSettings settings)
<>c__38`1.<Create>b__38_0()
ProfilerInterceptor.GuardInternal[T](Func`1 guardedAction)
UnitTest.TestMethod() line 23
namespace Example.UnitTests
{
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Telerik.JustMock;
public interface ParamExample
{
void Foo(int param);
}
public interface InParamExample
{
void Foo(in int param);
}
[TestClass]
public class UnitTest
{
[TestMethod]
public void TestMethod()
{
var mockedParamExample = Mock.Create<ParamExample>();
var mockedInParamExample = Mock.Create<InParamExample>();
}
}
}