Repository navigation
Expand file tree
/
Copy pathmock_StateStore.go
More file actions
144 lines (119 loc) · 3.56 KB
/
Copy pathmock_StateStore.go
File metadata and controls
144 lines (119 loc) · 3.56 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
//go:build test_unit || test_integration
package go_librespot
import (
mock "github.com/stretchr/testify/mock"
)
// NewMockStateStore creates a new instance of MockStateStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockStateStore(t interface {
mock.TestingT
Cleanup(func())
}) *MockStateStore {
mock := &MockStateStore{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
// MockStateStore is an autogenerated mock type for the StateStore type
type MockStateStore struct {
mock.Mock
}
type MockStateStore_Expecter struct {
mock *mock.Mock
}
func (_m *MockStateStore) EXPECT() *MockStateStore_Expecter {
return &MockStateStore_Expecter{mock: &_m.Mock}
}
// Load provides a mock function for the type MockStateStore
func (_mock *MockStateStore) Load() (*AppState, error) {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for Load")
}
var r0 *AppState
var r1 error
if returnFunc, ok := ret.Get(0).(func() (*AppState, error)); ok {
return returnFunc()
}
if returnFunc, ok := ret.Get(0).(func() *AppState); ok {
r0 = returnFunc()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*AppState)
}
}
if returnFunc, ok := ret.Get(1).(func() error); ok {
r1 = returnFunc()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockStateStore_Load_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Load'
type MockStateStore_Load_Call struct {
*mock.Call
}
// Load is a helper method to define mock.On call
func (_e *MockStateStore_Expecter) Load() *MockStateStore_Load_Call {
return &MockStateStore_Load_Call{Call: _e.mock.On("Load")}
}
func (_c *MockStateStore_Load_Call) Run(run func()) *MockStateStore_Load_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockStateStore_Load_Call) Return(appState *AppState, err error) *MockStateStore_Load_Call {
_c.Call.Return(appState, err)
return _c
}
func (_c *MockStateStore_Load_Call) RunAndReturn(run func() (*AppState, error)) *MockStateStore_Load_Call {
_c.Call.Return(run)
return _c
}
// Save provides a mock function for the type MockStateStore
func (_mock *MockStateStore) Save(appState *AppState) error {
ret := _mock.Called(appState)
if len(ret) == 0 {
panic("no return value specified for Save")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(*AppState) error); ok {
r0 = returnFunc(appState)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockStateStore_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
type MockStateStore_Save_Call struct {
*mock.Call
}
// Save is a helper method to define mock.On call
// - appState *AppState
func (_e *MockStateStore_Expecter) Save(appState interface{}) *MockStateStore_Save_Call {
return &MockStateStore_Save_Call{Call: _e.mock.On("Save", appState)}
}
func (_c *MockStateStore_Save_Call) Run(run func(appState *AppState)) *MockStateStore_Save_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *AppState
if args[0] != nil {
arg0 = args[0].(*AppState)
}
run(
arg0,
)
})
return _c
}
func (_c *MockStateStore_Save_Call) Return(err error) *MockStateStore_Save_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockStateStore_Save_Call) RunAndReturn(run func(appState *AppState) error) *MockStateStore_Save_Call {
_c.Call.Return(run)
return _c
}