After stubbing the method use Return
to indicate what should it return, for example:
_mockRepository
.Stub(x => x.GetModuleKindPropertyNames(Arg<string>.Is.Anything))
.Return(Enumerable.Empty<string>().AsQueryable());
Also, change this line:
_controller.GetModulePropertyName(Arg<string>.Is.Anything);
to this:
_controller.GetModulePropertyName(string.Empty);
As the exception explains - Arg
is only to be used in mock definitions.