Debian Codegraph @

pkg/types/mocks/ServiceTimeout.go

raw
1 // Code generated by mockery; DO NOT EDIT.
2 // github.com/vektra/mockery
3 // template: testify
4
5 package mocks
6
7 import (
8 "time"
9
10 "github.com/nicholas-fedor/shoutrrr/pkg/types"
11 mock "github.com/stretchr/testify/mock"
12 )
13
14 // NewMockServiceTimeout creates a new instance of MockServiceTimeout. 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.
16 func NewMockServiceTimeout(t interface {
17 mock.TestingT
18 Cleanup(func())
19 }) *MockServiceTimeout {
20 if helper, ok := t.(interface{ Helper() }); ok {
21 helper.Helper()
22 }
23
24 mock := &MockServiceTimeout{}
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 // MockServiceTimeout is an autogenerated mock type for the ServiceTimeout type
38 type MockServiceTimeout struct {
39 mock.Mock
40 }
41
42 type MockServiceTimeout_Expecter struct {
43 mock *mock.Mock
44 }
45
46 func (_m *MockServiceTimeout) EXPECT() *MockServiceTimeout_Expecter {
47 return &MockServiceTimeout_Expecter{mock: &_m.Mock}
48 }
49
50 // ServiceTimeout provides a mock function for the type MockServiceTimeout
51 func (_mock *MockServiceTimeout) ServiceTimeout(params *types.Params) time.Duration {
52 ret := _mock.Called(params)
53
54 if len(ret) == 0 {
55 panic("no return value specified for ServiceTimeout")
56 }
57
58 var r0 time.Duration
59 if returnFunc, ok := ret.Get(0).(func(*types.Params) time.Duration); ok {
60 r0 = returnFunc(params)
61 } else {
62 r0 = ret.Get(0).(time.Duration)
63 }
64 return r0
65 }
66
67 // MockServiceTimeout_ServiceTimeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ServiceTimeout'
68 type MockServiceTimeout_ServiceTimeout_Call struct {
69 *mock.Call
70 }
71
72 // ServiceTimeout is a helper method to define mock.On call
73 // - params *types.Params
74 func (_e *MockServiceTimeout_Expecter) ServiceTimeout(params any) *MockServiceTimeout_ServiceTimeout_Call {
75 return &MockServiceTimeout_ServiceTimeout_Call{Call: _e.mock.On("ServiceTimeout", params)}
76 }
77
78 func (_c *MockServiceTimeout_ServiceTimeout_Call) Run(run func(params *types.Params)) *MockServiceTimeout_ServiceTimeout_Call {
79 _c.Call.Run(func(args mock.Arguments) {
80 var arg0 *types.Params
81 if args[0] != nil {
82 arg0 = args[0].(*types.Params)
83 }
84 run(
85 arg0,
86 )
87 })
88 return _c
89 }
90
91 func (_c *MockServiceTimeout_ServiceTimeout_Call) Return(duration time.Duration) *MockServiceTimeout_ServiceTimeout_Call {
92 _c.Call.Return(duration)
93 return _c
94 }
95
96 func (_c *MockServiceTimeout_ServiceTimeout_Call) RunAndReturn(run func(params *types.Params) time.Duration) *MockServiceTimeout_ServiceTimeout_Call {
97 _c.Call.Return(run)
98 return _c
99 }