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