-
Notifications
You must be signed in to change notification settings - Fork 13
/
backend.go
80 lines (62 loc) · 1.79 KB
/
backend.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
// Code generated by mockery v2.23.1. DO NOT EDIT.
package mocks
import (
mock "github.com/stretchr/testify/mock"
url "net/url"
)
// BackendMock is an autogenerated mock type for the Backend type
type BackendMock struct {
mock.Mock
}
type BackendMock_Expecter struct {
mock *mock.Mock
}
func (_m *BackendMock) EXPECT() *BackendMock_Expecter {
return &BackendMock_Expecter{mock: &_m.Mock}
}
// URL provides a mock function with given fields:
func (_m *BackendMock) URL() *url.URL {
ret := _m.Called()
var r0 *url.URL
if rf, ok := ret.Get(0).(func() *url.URL); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*url.URL)
}
}
return r0
}
// BackendMock_URL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'URL'
type BackendMock_URL_Call struct {
*mock.Call
}
// URL is a helper method to define mock.On call
func (_e *BackendMock_Expecter) URL() *BackendMock_URL_Call {
return &BackendMock_URL_Call{Call: _e.mock.On("URL")}
}
func (_c *BackendMock_URL_Call) Run(run func()) *BackendMock_URL_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *BackendMock_URL_Call) Return(_a0 *url.URL) *BackendMock_URL_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *BackendMock_URL_Call) RunAndReturn(run func() *url.URL) *BackendMock_URL_Call {
_c.Call.Return(run)
return _c
}
type mockConstructorTestingTNewBackendMock interface {
mock.TestingT
Cleanup(func())
}
// NewBackendMock creates a new instance of BackendMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewBackendMock(t mockConstructorTestingTNewBackendMock) *BackendMock {
mock := &BackendMock{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}