I have a method such as:
private bool DoAction(Type typeOfConsumer, params Object extraParams)
I want to assert it is called, where the public equivalent is:
Mock.Arrange(() => instanceOfClass.DoAction(Arg.IsAny<Type>()).MustBeCalled();
works for the call
instanceOfClass.DoAction(typeof(SomeType)); // No params, but does this matter?
and I would expect the non-public to be
Mock.NonPublic.Arrange(instanceOfClass, "DoAction", Arg.IsAny<Type>()).MustBeCalled();
but my (NUnit) exception is System.MissingMemberException : Method 'DoAction' with the given signature was not found on type...
It works with the public equivalent and
It does not work with the non-public whether the method is made protected or private.
I want to arrange and then assert that this method was called.