Here is an example of what I'd like to mock up?
namespace ExternalAssembly{ internal enum HintArg { Flag1,Flag2,Flag3} public class ExternalClass { private int MethodToMock(string name, HintArg hint, out string result) { result ="I want to override this"; return 0; } }}In this example what I'd like to have is a setup that will call the original MethodToMock on everything except when I have a specific name match?
I have something along the lines of:
string mockName="mockName";string mockResult ="new result";Mock.NonPublic.Arrange(typeof(ExternalClass),"MethodToMock",mockName,ArgExpr.IsAny<HintArg>(),ArgExpr.Out<string>(newResult).Returns(0);I'm just not sure how to specify the arg expression when the type is an internal that my invoking assembly is not friends with?