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