(method string, arguments ...interface{})
| 431 | } |
| 432 | |
| 433 | func (m *Mock) findClosestCall(method string, arguments ...interface{}) (*Call, string) { |
| 434 | var bestMatch matchCandidate |
| 435 | |
| 436 | for _, call := range m.expectedCalls() { |
| 437 | if call.Method == method { |
| 438 | |
| 439 | errInfo, tempDiffCount := call.Arguments.Diff(arguments) |
| 440 | tempCandidate := matchCandidate{ |
| 441 | call: call, |
| 442 | mismatch: errInfo, |
| 443 | diffCount: tempDiffCount, |
| 444 | } |
| 445 | if tempCandidate.isBetterMatchThan(bestMatch) { |
| 446 | bestMatch = tempCandidate |
| 447 | } |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | return bestMatch.call, bestMatch.mismatch |
| 452 | } |
| 453 | |
| 454 | func callString(method string, arguments Arguments, includeArgumentValues bool) string { |
| 455 | var argValsString string |
no test coverage detected