File: mock_test.go

package info (click to toggle)
golang-go.uber-mock 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,176 kB
  • sloc: sh: 37; makefile: 3
file content (66 lines) | stat: -rw-r--r-- 1,750 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Code generated by MockGen. DO NOT EDIT.
// Source: user_test.go
//
// Generated by this command:
//
//	mockgen --source=user_test.go --destination=mock_test.go --package=users_test
//

// Package users_test is a generated GoMock package.
package users_test

import (
	reflect "reflect"

	gomock "go.uber.org/mock/gomock"
)

// MockFinder is a mock of Finder interface.
type MockFinder struct {
	ctrl     *gomock.Controller
	recorder *MockFinderMockRecorder
	isgomock struct{}
}

// MockFinderMockRecorder is the mock recorder for MockFinder.
type MockFinderMockRecorder struct {
	mock *MockFinder
}

// NewMockFinder creates a new mock instance.
func NewMockFinder(ctrl *gomock.Controller) *MockFinder {
	mock := &MockFinder{ctrl: ctrl}
	mock.recorder = &MockFinderMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockFinder) EXPECT() *MockFinderMockRecorder {
	return m.recorder
}

// Add mocks base method.
func (m *MockFinder) Add(u User) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Add", u)
}

// Add indicates an expected call of Add.
func (mr *MockFinderMockRecorder) Add(u any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockFinder)(nil).Add), u)
}

// FindUser mocks base method.
func (m *MockFinder) FindUser(name string) User {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "FindUser", name)
	ret0, _ := ret[0].(User)
	return ret0
}

// FindUser indicates an expected call of FindUser.
func (mr *MockFinderMockRecorder) FindUser(name any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindUser", reflect.TypeOf((*MockFinder)(nil).FindUser), name)
}