notice_mock.go RawHistoryFolder
1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package portsmocks
6
7import (
8 "github.com/bnema/vev/internal/domain"
9 mock "github.com/stretchr/testify/mock"
10)
11
12// NewMockNoticeStore creates a new instance of MockNoticeStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13// The first argument is typically a *testing.T value.
14func NewMockNoticeStore(t interface {
15 mock.TestingT
16 Cleanup(func())
17}) *MockNoticeStore {
18 mock := &MockNoticeStore{}
19 mock.Mock.Test(t)
20
21 t.Cleanup(func() { mock.AssertExpectations(t) })
22
23 return mock
24}
25
26// MockNoticeStore is an autogenerated mock type for the NoticeStore type
27type MockNoticeStore struct {
28 mock.Mock
29}
30
31type MockNoticeStore_Expecter struct {
32 mock *mock.Mock
33}
34
35func (_m *MockNoticeStore) EXPECT() *MockNoticeStore_Expecter {
36 return &MockNoticeStore_Expecter{mock: &_m.Mock}
37}
38
39// Ack provides a mock function for the type MockNoticeStore
40func (_mock *MockNoticeStore) Ack() error {
41 ret := _mock.Called()
42
43 if len(ret) == 0 {
44 panic("no return value specified for Ack")
45 }
46
47 var r0 error
48 if returnFunc, ok := ret.Get(0).(func() error); ok {
49 r0 = returnFunc()
50 } else {
51 r0 = ret.Error(0)
52 }
53 return r0
54}
55
56// MockNoticeStore_Ack_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ack'
57type MockNoticeStore_Ack_Call struct {
58 *mock.Call
59}
60
61// Ack is a helper method to define mock.On call
62func (_e *MockNoticeStore_Expecter) Ack() *MockNoticeStore_Ack_Call {
63 return &MockNoticeStore_Ack_Call{Call: _e.mock.On("Ack")}
64}
65
66func (_c *MockNoticeStore_Ack_Call) Run(run func()) *MockNoticeStore_Ack_Call {
67 _c.Call.Run(func(args mock.Arguments) {
68 run()
69 })
70 return _c
71}
72
73func (_c *MockNoticeStore_Ack_Call) Return(err error) *MockNoticeStore_Ack_Call {
74 _c.Call.Return(err)
75 return _c
76}
77
78func (_c *MockNoticeStore_Ack_Call) RunAndReturn(run func() error) *MockNoticeStore_Ack_Call {
79 _c.Call.Return(run)
80 return _c
81}
82
83// Append provides a mock function for the type MockNoticeStore
84func (_mock *MockNoticeStore) Append(n domain.Notification) error {
85 ret := _mock.Called(n)
86
87 if len(ret) == 0 {
88 panic("no return value specified for Append")
89 }
90
91 var r0 error
92 if returnFunc, ok := ret.Get(0).(func(domain.Notification) error); ok {
93 r0 = returnFunc(n)
94 } else {
95 r0 = ret.Error(0)
96 }
97 return r0
98}
99
100// MockNoticeStore_Append_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Append'
101type MockNoticeStore_Append_Call struct {
102 *mock.Call
103}
104
105// Append is a helper method to define mock.On call
106// - n domain.Notification
107func (_e *MockNoticeStore_Expecter) Append(n any) *MockNoticeStore_Append_Call {
108 return &MockNoticeStore_Append_Call{Call: _e.mock.On("Append", n)}
109}
110
111func (_c *MockNoticeStore_Append_Call) Run(run func(n domain.Notification)) *MockNoticeStore_Append_Call {
112 _c.Call.Run(func(args mock.Arguments) {
113 var arg0 domain.Notification
114 if args[0] != nil {
115 arg0 = args[0].(domain.Notification)
116 }
117 run(
118 arg0,
119 )
120 })
121 return _c
122}
123
124func (_c *MockNoticeStore_Append_Call) Return(err error) *MockNoticeStore_Append_Call {
125 _c.Call.Return(err)
126 return _c
127}
128
129func (_c *MockNoticeStore_Append_Call) RunAndReturn(run func(n domain.Notification) error) *MockNoticeStore_Append_Call {
130 _c.Call.Return(run)
131 return _c
132}
133
134// Claim provides a mock function for the type MockNoticeStore
135func (_mock *MockNoticeStore) Claim() ([]domain.Notification, error) {
136 ret := _mock.Called()
137
138 if len(ret) == 0 {
139 panic("no return value specified for Claim")
140 }
141
142 var r0 []domain.Notification
143 var r1 error
144 if returnFunc, ok := ret.Get(0).(func() ([]domain.Notification, error)); ok {
145 return returnFunc()
146 }
147 if returnFunc, ok := ret.Get(0).(func() []domain.Notification); ok {
148 r0 = returnFunc()
149 } else {
150 if ret.Get(0) != nil {
151 r0 = ret.Get(0).([]domain.Notification)
152 }
153 }
154 if returnFunc, ok := ret.Get(1).(func() error); ok {
155 r1 = returnFunc()
156 } else {
157 r1 = ret.Error(1)
158 }
159 return r0, r1
160}
161
162// MockNoticeStore_Claim_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Claim'
163type MockNoticeStore_Claim_Call struct {
164 *mock.Call
165}
166
167// Claim is a helper method to define mock.On call
168func (_e *MockNoticeStore_Expecter) Claim() *MockNoticeStore_Claim_Call {
169 return &MockNoticeStore_Claim_Call{Call: _e.mock.On("Claim")}
170}
171
172func (_c *MockNoticeStore_Claim_Call) Run(run func()) *MockNoticeStore_Claim_Call {
173 _c.Call.Run(func(args mock.Arguments) {
174 run()
175 })
176 return _c
177}
178
179func (_c *MockNoticeStore_Claim_Call) Return(notifications []domain.Notification, err error) *MockNoticeStore_Claim_Call {
180 _c.Call.Return(notifications, err)
181 return _c
182}
183
184func (_c *MockNoticeStore_Claim_Call) RunAndReturn(run func() ([]domain.Notification, error)) *MockNoticeStore_Claim_Call {
185 _c.Call.Return(run)
186 return _c
187}