当我尝试执行一种测试方法时,它失败,但出现以下异常:
System.InvalidOperationException: _5MSCAPTVvCE53ofLWmErNt4nvNO_._n18Eb1DF6eMsCxaJ9Z8eBYuIm18_ is inaccessible due to its protection level. Only public types can be processed.
Looking at the stack trace it is confirmed that, error is originating while mocking an object using Isolate.Fake.AllInstances method. which looks something like this.
Isolate.Fake.AllInstances<Dependency>(Members.ReturnRecursiveFakes, ConstructorWillBe.Ignored);
也已验证,所有类及其成员均为public类型。