当我尝试伪造委托类型时,我得到 System.InvalidCastException
[TestMethod]
public void TestDelegateFake()
{
var func = A.Fake<Func<long, object>>();
A.CallTo(() => func(A<long>.Ignored))
.Returns(new {});
func(123);
}
我怎么伪造代表?
当我尝试伪造委托类型时,我得到 System.InvalidCastException
[TestMethod]
public void TestDelegateFake()
{
var func = A.Fake<Func<long, object>>();
A.CallTo(() => func(A<long>.Ignored))
.Returns(new {});
func(123);
}
我怎么伪造代表?