-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock.go
111 lines (93 loc) · 3.62 KB
/
mock.go
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// Code generated by MockGen. DO NOT EDIT.
// Source: shorten.go
// Package webhttp is a generated GoMock package.
package webhttp
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
shorten "github.com/pavelmemory/jobtome/internal/shorten"
)
// MockShortenService is a mock of ShortenService interface
type MockShortenService struct {
ctrl *gomock.Controller
recorder *MockShortenServiceMockRecorder
}
// MockShortenServiceMockRecorder is the mock recorder for MockShortenService
type MockShortenServiceMockRecorder struct {
mock *MockShortenService
}
// NewMockShortenService creates a new mock instance
func NewMockShortenService(ctrl *gomock.Controller) *MockShortenService {
mock := &MockShortenService{ctrl: ctrl}
mock.recorder = &MockShortenServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockShortenService) EXPECT() *MockShortenServiceMockRecorder {
return m.recorder
}
// Create mocks base method
func (m *MockShortenService) Create(ctx context.Context, entity shorten.Entity) (int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Create", ctx, entity)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Create indicates an expected call of Create
func (mr *MockShortenServiceMockRecorder) Create(ctx, entity interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockShortenService)(nil).Create), ctx, entity)
}
// Get mocks base method
func (m *MockShortenService) Get(ctx context.Context, id int64) (shorten.Entity, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", ctx, id)
ret0, _ := ret[0].(shorten.Entity)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get
func (mr *MockShortenServiceMockRecorder) Get(ctx, id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockShortenService)(nil).Get), ctx, id)
}
// List mocks base method
func (m *MockShortenService) List(ctx context.Context, pager shorten.Pager) ([]shorten.Entity, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "List", ctx, pager)
ret0, _ := ret[0].([]shorten.Entity)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// List indicates an expected call of List
func (mr *MockShortenServiceMockRecorder) List(ctx, pager interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockShortenService)(nil).List), ctx, pager)
}
// Delete mocks base method
func (m *MockShortenService) Delete(ctx context.Context, id int64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", ctx, id)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete
func (mr *MockShortenServiceMockRecorder) Delete(ctx, id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockShortenService)(nil).Delete), ctx, id)
}
// Resolve mocks base method
func (m *MockShortenService) Resolve(ctx context.Context, hash string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Resolve", ctx, hash)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Resolve indicates an expected call of Resolve
func (mr *MockShortenServiceMockRecorder) Resolve(ctx, hash interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resolve", reflect.TypeOf((*MockShortenService)(nil).Resolve), ctx, hash)
}