Repository navigation
Expand file tree
/
Copy pathmock_AudioSource.go
More file actions
193 lines (160 loc) · 5 KB
/
Copy pathmock_AudioSource.go
File metadata and controls
193 lines (160 loc) · 5 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
// 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"
)
// NewMockAudioSource creates a new instance of MockAudioSource. 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 NewMockAudioSource(t interface {
mock.TestingT
Cleanup(func())
}) *MockAudioSource {
mock := &MockAudioSource{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
// MockAudioSource is an autogenerated mock type for the AudioSource type
type MockAudioSource struct {
mock.Mock
}
type MockAudioSource_Expecter struct {
mock *mock.Mock
}
func (_m *MockAudioSource) EXPECT() *MockAudioSource_Expecter {
return &MockAudioSource_Expecter{mock: &_m.Mock}
}
// PositionMs provides a mock function for the type MockAudioSource
func (_mock *MockAudioSource) PositionMs() int64 {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for PositionMs")
}
var r0 int64
if returnFunc, ok := ret.Get(0).(func() int64); ok {
r0 = returnFunc()
} else {
r0 = ret.Get(0).(int64)
}
return r0
}
// MockAudioSource_PositionMs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PositionMs'
type MockAudioSource_PositionMs_Call struct {
*mock.Call
}
// PositionMs is a helper method to define mock.On call
func (_e *MockAudioSource_Expecter) PositionMs() *MockAudioSource_PositionMs_Call {
return &MockAudioSource_PositionMs_Call{Call: _e.mock.On("PositionMs")}
}
func (_c *MockAudioSource_PositionMs_Call) Run(run func()) *MockAudioSource_PositionMs_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockAudioSource_PositionMs_Call) Return(n int64) *MockAudioSource_PositionMs_Call {
_c.Call.Return(n)
return _c
}
func (_c *MockAudioSource_PositionMs_Call) RunAndReturn(run func() int64) *MockAudioSource_PositionMs_Call {
_c.Call.Return(run)
return _c
}
// Read provides a mock function for the type MockAudioSource
func (_mock *MockAudioSource) Read(float32s []float32) (int, error) {
ret := _mock.Called(float32s)
if len(ret) == 0 {
panic("no return value specified for Read")
}
var r0 int
var r1 error
if returnFunc, ok := ret.Get(0).(func([]float32) (int, error)); ok {
return returnFunc(float32s)
}
if returnFunc, ok := ret.Get(0).(func([]float32) int); ok {
r0 = returnFunc(float32s)
} else {
r0 = ret.Get(0).(int)
}
if returnFunc, ok := ret.Get(1).(func([]float32) error); ok {
r1 = returnFunc(float32s)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockAudioSource_Read_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Read'
type MockAudioSource_Read_Call struct {
*mock.Call
}
// Read is a helper method to define mock.On call
// - float32s []float32
func (_e *MockAudioSource_Expecter) Read(float32s interface{}) *MockAudioSource_Read_Call {
return &MockAudioSource_Read_Call{Call: _e.mock.On("Read", float32s)}
}
func (_c *MockAudioSource_Read_Call) Run(run func(float32s []float32)) *MockAudioSource_Read_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 []float32
if args[0] != nil {
arg0 = args[0].([]float32)
}
run(
arg0,
)
})
return _c
}
func (_c *MockAudioSource_Read_Call) Return(n int, err error) *MockAudioSource_Read_Call {
_c.Call.Return(n, err)
return _c
}
func (_c *MockAudioSource_Read_Call) RunAndReturn(run func(float32s []float32) (int, error)) *MockAudioSource_Read_Call {
_c.Call.Return(run)
return _c
}
// SetPositionMs provides a mock function for the type MockAudioSource
func (_mock *MockAudioSource) SetPositionMs(n int64) error {
ret := _mock.Called(n)
if len(ret) == 0 {
panic("no return value specified for SetPositionMs")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(int64) error); ok {
r0 = returnFunc(n)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockAudioSource_SetPositionMs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPositionMs'
type MockAudioSource_SetPositionMs_Call struct {
*mock.Call
}
// SetPositionMs is a helper method to define mock.On call
// - n int64
func (_e *MockAudioSource_Expecter) SetPositionMs(n interface{}) *MockAudioSource_SetPositionMs_Call {
return &MockAudioSource_SetPositionMs_Call{Call: _e.mock.On("SetPositionMs", n)}
}
func (_c *MockAudioSource_SetPositionMs_Call) Run(run func(n int64)) *MockAudioSource_SetPositionMs_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 int64
if args[0] != nil {
arg0 = args[0].(int64)
}
run(
arg0,
)
})
return _c
}
func (_c *MockAudioSource_SetPositionMs_Call) Return(err error) *MockAudioSource_SetPositionMs_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockAudioSource_SetPositionMs_Call) RunAndReturn(run func(n int64) error) *MockAudioSource_SetPositionMs_Call {
_c.Call.Return(run)
return _c
}