moq: When using Setup(), how is equality of method parameters determined?

For a slightly more detailed answer, Moq uses the ConstantMatcher (link is to current latest version 4.13.1). The implementation of that matcher is

  1. Use object.Equals
  2. If object.Equals failed and value implements IEnumerable use SequenceEqual<object> (which uses object.Equals for each element)
  3. If both of the above failed return false

The answer to my question is that Moq uses .Equals to determine whether parameters to set up methods are equal.