isArgsEqual compares arguments
(expected Arguments, args []interface{})
| 740 | |
| 741 | // isArgsEqual compares arguments |
| 742 | func isArgsEqual(expected Arguments, args []interface{}) bool { |
| 743 | if len(expected) != len(args) { |
| 744 | return false |
| 745 | } |
| 746 | for i, v := range args { |
| 747 | if !reflect.DeepEqual(expected[i], v) { |
| 748 | return false |
| 749 | } |
| 750 | } |
| 751 | return true |
| 752 | } |
| 753 | |
| 754 | func (m *Mock) methodWasCalled(methodName string, expected []interface{}) bool { |
| 755 | for _, call := range m.calls() { |
no outgoing calls