C# 8 introduces default interface method implementations. Attempt to mock such methods with JustMock in elevated mode fails. The following example illustrates the issue:
public interface IMyInterface
{
int IntProperty { get => 0; }
}
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
var mock = Mock.Create<IMyInterface>();
Mock.Arrange(() => mock.IntProperty).Returns(1);
Assert.AreEqual(1, mock.IntProperty);
}
}