runtime_config.go RawHistoryFolder
1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "github.com/bnema/dumber/internal/domain/entity"
9 mock "github.com/stretchr/testify/mock"
10)
11
12// NewMockRuntimeConfigProvider creates a new instance of MockRuntimeConfigProvider. 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 NewMockRuntimeConfigProvider(t interface {
15 mock.TestingT
16 Cleanup(func())
17}) *MockRuntimeConfigProvider {
18 mock := &MockRuntimeConfigProvider{}
19 mock.Mock.Test(t)
20
21 t.Cleanup(func() { mock.AssertExpectations(t) })
22
23 return mock
24}
25
26// MockRuntimeConfigProvider is an autogenerated mock type for the RuntimeConfigProvider type
27type MockRuntimeConfigProvider struct {
28 mock.Mock
29}
30
31type MockRuntimeConfigProvider_Expecter struct {
32 mock *mock.Mock
33}
34
35func (_m *MockRuntimeConfigProvider) EXPECT() *MockRuntimeConfigProvider_Expecter {
36 return &MockRuntimeConfigProvider_Expecter{mock: &_m.Mock}
37}
38
39// Current provides a mock function for the type MockRuntimeConfigProvider
40func (_mock *MockRuntimeConfigProvider) Current() entity.RuntimeConfigSnapshot {
41 ret := _mock.Called()
42
43 if len(ret) == 0 {
44 panic("no return value specified for Current")
45 }
46
47 var r0 entity.RuntimeConfigSnapshot
48 if returnFunc, ok := ret.Get(0).(func() entity.RuntimeConfigSnapshot); ok {
49 r0 = returnFunc()
50 } else {
51 r0 = ret.Get(0).(entity.RuntimeConfigSnapshot)
52 }
53 return r0
54}
55
56// MockRuntimeConfigProvider_Current_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Current'
57type MockRuntimeConfigProvider_Current_Call struct {
58 *mock.Call
59}
60
61// Current is a helper method to define mock.On call
62func (_e *MockRuntimeConfigProvider_Expecter) Current() *MockRuntimeConfigProvider_Current_Call {
63 return &MockRuntimeConfigProvider_Current_Call{Call: _e.mock.On("Current")}
64}
65
66func (_c *MockRuntimeConfigProvider_Current_Call) Run(run func()) *MockRuntimeConfigProvider_Current_Call {
67 _c.Call.Run(func(args mock.Arguments) {
68 run()
69 })
70 return _c
71}
72
73func (_c *MockRuntimeConfigProvider_Current_Call) Return(runtimeConfigSnapshot entity.RuntimeConfigSnapshot) *MockRuntimeConfigProvider_Current_Call {
74 _c.Call.Return(runtimeConfigSnapshot)
75 return _c
76}
77
78func (_c *MockRuntimeConfigProvider_Current_Call) RunAndReturn(run func() entity.RuntimeConfigSnapshot) *MockRuntimeConfigProvider_Current_Call {
79 _c.Call.Return(run)
80 return _c
81}
82
83// OnChange provides a mock function for the type MockRuntimeConfigProvider
84func (_mock *MockRuntimeConfigProvider) OnChange(fn func(entity.RuntimeConfigSnapshot)) {
85 _mock.Called(fn)
86 return
87}
88
89// MockRuntimeConfigProvider_OnChange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnChange'
90type MockRuntimeConfigProvider_OnChange_Call struct {
91 *mock.Call
92}
93
94// OnChange is a helper method to define mock.On call
95// - fn func(entity.RuntimeConfigSnapshot)
96func (_e *MockRuntimeConfigProvider_Expecter) OnChange(fn any) *MockRuntimeConfigProvider_OnChange_Call {
97 return &MockRuntimeConfigProvider_OnChange_Call{Call: _e.mock.On("OnChange", fn)}
98}
99
100func (_c *MockRuntimeConfigProvider_OnChange_Call) Run(run func(fn func(entity.RuntimeConfigSnapshot))) *MockRuntimeConfigProvider_OnChange_Call {
101 _c.Call.Run(func(args mock.Arguments) {
102 var arg0 func(entity.RuntimeConfigSnapshot)
103 if args[0] != nil {
104 arg0 = args[0].(func(entity.RuntimeConfigSnapshot))
105 }
106 run(
107 arg0,
108 )
109 })
110 return _c
111}
112
113func (_c *MockRuntimeConfigProvider_OnChange_Call) Return() *MockRuntimeConfigProvider_OnChange_Call {
114 _c.Call.Return()
115 return _c
116}
117
118func (_c *MockRuntimeConfigProvider_OnChange_Call) RunAndReturn(run func(fn func(entity.RuntimeConfigSnapshot))) *MockRuntimeConfigProvider_OnChange_Call {
119 _c.Run(run)
120 return _c
121}
122
123// Watch provides a mock function for the type MockRuntimeConfigProvider
124func (_mock *MockRuntimeConfigProvider) Watch() error {
125 ret := _mock.Called()
126
127 if len(ret) == 0 {
128 panic("no return value specified for Watch")
129 }
130
131 var r0 error
132 if returnFunc, ok := ret.Get(0).(func() error); ok {
133 r0 = returnFunc()
134 } else {
135 r0 = ret.Error(0)
136 }
137 return r0
138}
139
140// MockRuntimeConfigProvider_Watch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Watch'
141type MockRuntimeConfigProvider_Watch_Call struct {
142 *mock.Call
143}
144
145// Watch is a helper method to define mock.On call
146func (_e *MockRuntimeConfigProvider_Expecter) Watch() *MockRuntimeConfigProvider_Watch_Call {
147 return &MockRuntimeConfigProvider_Watch_Call{Call: _e.mock.On("Watch")}
148}
149
150func (_c *MockRuntimeConfigProvider_Watch_Call) Run(run func()) *MockRuntimeConfigProvider_Watch_Call {
151 _c.Call.Run(func(args mock.Arguments) {
152 run()
153 })
154 return _c
155}
156
157func (_c *MockRuntimeConfigProvider_Watch_Call) Return(err error) *MockRuntimeConfigProvider_Watch_Call {
158 _c.Call.Return(err)
159 return _c
160}
161
162func (_c *MockRuntimeConfigProvider_Watch_Call) RunAndReturn(run func() error) *MockRuntimeConfigProvider_Watch_Call {
163 _c.Call.Return(run)
164 return _c
165}