-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathTimeLineService.go
195 lines (156 loc) · 7.63 KB
/
TimeLineService.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
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
194
195
// Code generated by mockery v2.53.2. DO NOT EDIT.
package mocks
import (
context "context"
auth "github.com/bangumi/server/internal/auth"
collection "github.com/bangumi/server/internal/collections/domain/collection"
episode "github.com/bangumi/server/internal/episode"
mock "github.com/stretchr/testify/mock"
model "github.com/bangumi/server/internal/model"
)
// TimeLineService is an autogenerated mock type for the Service type
type TimeLineService struct {
mock.Mock
}
type TimeLineService_Expecter struct {
mock *mock.Mock
}
func (_m *TimeLineService) EXPECT() *TimeLineService_Expecter {
return &TimeLineService_Expecter{mock: &_m.Mock}
}
// ChangeEpisodeStatus provides a mock function with given fields: ctx, u, sbj, _a3, t
func (_m *TimeLineService) ChangeEpisodeStatus(ctx context.Context, u auth.Auth, sbj model.Subject, _a3 episode.Episode, t collection.EpisodeCollection) error {
ret := _m.Called(ctx, u, sbj, _a3, t)
if len(ret) == 0 {
panic("no return value specified for ChangeEpisodeStatus")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, auth.Auth, model.Subject, episode.Episode, collection.EpisodeCollection) error); ok {
r0 = rf(ctx, u, sbj, _a3, t)
} else {
r0 = ret.Error(0)
}
return r0
}
// TimeLineService_ChangeEpisodeStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangeEpisodeStatus'
type TimeLineService_ChangeEpisodeStatus_Call struct {
*mock.Call
}
// ChangeEpisodeStatus is a helper method to define mock.On call
// - ctx context.Context
// - u auth.Auth
// - sbj model.Subject
// - _a3 episode.Episode
// - t collection.EpisodeCollection
func (_e *TimeLineService_Expecter) ChangeEpisodeStatus(ctx interface{}, u interface{}, sbj interface{}, _a3 interface{}, t interface{}) *TimeLineService_ChangeEpisodeStatus_Call {
return &TimeLineService_ChangeEpisodeStatus_Call{Call: _e.mock.On("ChangeEpisodeStatus", ctx, u, sbj, _a3, t)}
}
func (_c *TimeLineService_ChangeEpisodeStatus_Call) Run(run func(ctx context.Context, u auth.Auth, sbj model.Subject, _a3 episode.Episode, t collection.EpisodeCollection)) *TimeLineService_ChangeEpisodeStatus_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(auth.Auth), args[2].(model.Subject), args[3].(episode.Episode), args[4].(collection.EpisodeCollection))
})
return _c
}
func (_c *TimeLineService_ChangeEpisodeStatus_Call) Return(_a0 error) *TimeLineService_ChangeEpisodeStatus_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *TimeLineService_ChangeEpisodeStatus_Call) RunAndReturn(run func(context.Context, auth.Auth, model.Subject, episode.Episode, collection.EpisodeCollection) error) *TimeLineService_ChangeEpisodeStatus_Call {
_c.Call.Return(run)
return _c
}
// ChangeSubjectCollection provides a mock function with given fields: ctx, u, sbj, collect, collectID, comment, rate
func (_m *TimeLineService) ChangeSubjectCollection(ctx context.Context, u uint32, sbj model.Subject, collect collection.SubjectCollection, collectID uint64, comment string, rate uint8) error {
ret := _m.Called(ctx, u, sbj, collect, collectID, comment, rate)
if len(ret) == 0 {
panic("no return value specified for ChangeSubjectCollection")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, uint32, model.Subject, collection.SubjectCollection, uint64, string, uint8) error); ok {
r0 = rf(ctx, u, sbj, collect, collectID, comment, rate)
} else {
r0 = ret.Error(0)
}
return r0
}
// TimeLineService_ChangeSubjectCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangeSubjectCollection'
type TimeLineService_ChangeSubjectCollection_Call struct {
*mock.Call
}
// ChangeSubjectCollection is a helper method to define mock.On call
// - ctx context.Context
// - u uint32
// - sbj model.Subject
// - collect collection.SubjectCollection
// - collectID uint64
// - comment string
// - rate uint8
func (_e *TimeLineService_Expecter) ChangeSubjectCollection(ctx interface{}, u interface{}, sbj interface{}, collect interface{}, collectID interface{}, comment interface{}, rate interface{}) *TimeLineService_ChangeSubjectCollection_Call {
return &TimeLineService_ChangeSubjectCollection_Call{Call: _e.mock.On("ChangeSubjectCollection", ctx, u, sbj, collect, collectID, comment, rate)}
}
func (_c *TimeLineService_ChangeSubjectCollection_Call) Run(run func(ctx context.Context, u uint32, sbj model.Subject, collect collection.SubjectCollection, collectID uint64, comment string, rate uint8)) *TimeLineService_ChangeSubjectCollection_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32), args[2].(model.Subject), args[3].(collection.SubjectCollection), args[4].(uint64), args[5].(string), args[6].(uint8))
})
return _c
}
func (_c *TimeLineService_ChangeSubjectCollection_Call) Return(_a0 error) *TimeLineService_ChangeSubjectCollection_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *TimeLineService_ChangeSubjectCollection_Call) RunAndReturn(run func(context.Context, uint32, model.Subject, collection.SubjectCollection, uint64, string, uint8) error) *TimeLineService_ChangeSubjectCollection_Call {
_c.Call.Return(run)
return _c
}
// ChangeSubjectProgress provides a mock function with given fields: ctx, u, sbj, epsUpdate, volsUpdate
func (_m *TimeLineService) ChangeSubjectProgress(ctx context.Context, u uint32, sbj model.Subject, epsUpdate uint32, volsUpdate uint32) error {
ret := _m.Called(ctx, u, sbj, epsUpdate, volsUpdate)
if len(ret) == 0 {
panic("no return value specified for ChangeSubjectProgress")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, uint32, model.Subject, uint32, uint32) error); ok {
r0 = rf(ctx, u, sbj, epsUpdate, volsUpdate)
} else {
r0 = ret.Error(0)
}
return r0
}
// TimeLineService_ChangeSubjectProgress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangeSubjectProgress'
type TimeLineService_ChangeSubjectProgress_Call struct {
*mock.Call
}
// ChangeSubjectProgress is a helper method to define mock.On call
// - ctx context.Context
// - u uint32
// - sbj model.Subject
// - epsUpdate uint32
// - volsUpdate uint32
func (_e *TimeLineService_Expecter) ChangeSubjectProgress(ctx interface{}, u interface{}, sbj interface{}, epsUpdate interface{}, volsUpdate interface{}) *TimeLineService_ChangeSubjectProgress_Call {
return &TimeLineService_ChangeSubjectProgress_Call{Call: _e.mock.On("ChangeSubjectProgress", ctx, u, sbj, epsUpdate, volsUpdate)}
}
func (_c *TimeLineService_ChangeSubjectProgress_Call) Run(run func(ctx context.Context, u uint32, sbj model.Subject, epsUpdate uint32, volsUpdate uint32)) *TimeLineService_ChangeSubjectProgress_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32), args[2].(model.Subject), args[3].(uint32), args[4].(uint32))
})
return _c
}
func (_c *TimeLineService_ChangeSubjectProgress_Call) Return(_a0 error) *TimeLineService_ChangeSubjectProgress_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *TimeLineService_ChangeSubjectProgress_Call) RunAndReturn(run func(context.Context, uint32, model.Subject, uint32, uint32) error) *TimeLineService_ChangeSubjectProgress_Call {
_c.Call.Return(run)
return _c
}
// NewTimeLineService creates a new instance of TimeLineService. 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 NewTimeLineService(t interface {
mock.TestingT
Cleanup(func())
}) *TimeLineService {
mock := &TimeLineService{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}