link_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/ports"
9 mock "github.com/stretchr/testify/mock"
10)
11
12// NewMockLinkStateReporter creates a new instance of MockLinkStateReporter. 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 NewMockLinkStateReporter(t interface {
15 mock.TestingT
16 Cleanup(func())
17}) *MockLinkStateReporter {
18 mock := &MockLinkStateReporter{}
19 mock.Mock.Test(t)
20
21 t.Cleanup(func() { mock.AssertExpectations(t) })
22
23 return mock
24}
25
26// MockLinkStateReporter is an autogenerated mock type for the LinkStateReporter type
27type MockLinkStateReporter struct {
28 mock.Mock
29}
30
31type MockLinkStateReporter_Expecter struct {
32 mock *mock.Mock
33}
34
35func (_m *MockLinkStateReporter) EXPECT() *MockLinkStateReporter_Expecter {
36 return &MockLinkStateReporter_Expecter{mock: &_m.Mock}
37}
38
39// LinkEvents provides a mock function for the type MockLinkStateReporter
40func (_mock *MockLinkStateReporter) LinkEvents() <-chan ports.LinkEvent {
41 ret := _mock.Called()
42
43 if len(ret) == 0 {
44 panic("no return value specified for LinkEvents")
45 }
46
47 var r0 <-chan ports.LinkEvent
48 if returnFunc, ok := ret.Get(0).(func() <-chan ports.LinkEvent); ok {
49 r0 = returnFunc()
50 } else {
51 if ret.Get(0) != nil {
52 r0 = ret.Get(0).(<-chan ports.LinkEvent)
53 }
54 }
55 return r0
56}
57
58// MockLinkStateReporter_LinkEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LinkEvents'
59type MockLinkStateReporter_LinkEvents_Call struct {
60 *mock.Call
61}
62
63// LinkEvents is a helper method to define mock.On call
64func (_e *MockLinkStateReporter_Expecter) LinkEvents() *MockLinkStateReporter_LinkEvents_Call {
65 return &MockLinkStateReporter_LinkEvents_Call{Call: _e.mock.On("LinkEvents")}
66}
67
68func (_c *MockLinkStateReporter_LinkEvents_Call) Run(run func()) *MockLinkStateReporter_LinkEvents_Call {
69 _c.Call.Run(func(args mock.Arguments) {
70 run()
71 })
72 return _c
73}
74
75func (_c *MockLinkStateReporter_LinkEvents_Call) Return(linkEventCh <-chan ports.LinkEvent) *MockLinkStateReporter_LinkEvents_Call {
76 _c.Call.Return(linkEventCh)
77 return _c
78}
79
80func (_c *MockLinkStateReporter_LinkEvents_Call) RunAndReturn(run func() <-chan ports.LinkEvent) *MockLinkStateReporter_LinkEvents_Call {
81 _c.Call.Return(run)
82 return _c
83}
84
85// LinkState provides a mock function for the type MockLinkStateReporter
86func (_mock *MockLinkStateReporter) LinkState() ports.LinkState {
87 ret := _mock.Called()
88
89 if len(ret) == 0 {
90 panic("no return value specified for LinkState")
91 }
92
93 var r0 ports.LinkState
94 if returnFunc, ok := ret.Get(0).(func() ports.LinkState); ok {
95 r0 = returnFunc()
96 } else {
97 r0 = ret.Get(0).(ports.LinkState)
98 }
99 return r0
100}
101
102// MockLinkStateReporter_LinkState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LinkState'
103type MockLinkStateReporter_LinkState_Call struct {
104 *mock.Call
105}
106
107// LinkState is a helper method to define mock.On call
108func (_e *MockLinkStateReporter_Expecter) LinkState() *MockLinkStateReporter_LinkState_Call {
109 return &MockLinkStateReporter_LinkState_Call{Call: _e.mock.On("LinkState")}
110}
111
112func (_c *MockLinkStateReporter_LinkState_Call) Run(run func()) *MockLinkStateReporter_LinkState_Call {
113 _c.Call.Run(func(args mock.Arguments) {
114 run()
115 })
116 return _c
117}
118
119func (_c *MockLinkStateReporter_LinkState_Call) Return(linkState ports.LinkState) *MockLinkStateReporter_LinkState_Call {
120 _c.Call.Return(linkState)
121 return _c
122}
123
124func (_c *MockLinkStateReporter_LinkState_Call) RunAndReturn(run func() ports.LinkState) *MockLinkStateReporter_LinkState_Call {
125 _c.Call.Return(run)
126 return _c
127}