github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/mocknetwork/incoming_message_scope.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mocknetwork 4 5 import ( 6 flow "github.com/onflow/flow-go/model/flow" 7 channels "github.com/onflow/flow-go/network/channels" 8 9 message "github.com/onflow/flow-go/network/message" 10 11 mock "github.com/stretchr/testify/mock" 12 ) 13 14 // IncomingMessageScope is an autogenerated mock type for the IncomingMessageScope type 15 type IncomingMessageScope struct { 16 mock.Mock 17 } 18 19 // Channel provides a mock function with given fields: 20 func (_m *IncomingMessageScope) Channel() channels.Channel { 21 ret := _m.Called() 22 23 var r0 channels.Channel 24 if rf, ok := ret.Get(0).(func() channels.Channel); ok { 25 r0 = rf() 26 } else { 27 r0 = ret.Get(0).(channels.Channel) 28 } 29 30 return r0 31 } 32 33 // DecodedPayload provides a mock function with given fields: 34 func (_m *IncomingMessageScope) DecodedPayload() interface{} { 35 ret := _m.Called() 36 37 var r0 interface{} 38 if rf, ok := ret.Get(0).(func() interface{}); ok { 39 r0 = rf() 40 } else { 41 if ret.Get(0) != nil { 42 r0 = ret.Get(0).(interface{}) 43 } 44 } 45 46 return r0 47 } 48 49 // EventID provides a mock function with given fields: 50 func (_m *IncomingMessageScope) EventID() []byte { 51 ret := _m.Called() 52 53 var r0 []byte 54 if rf, ok := ret.Get(0).(func() []byte); ok { 55 r0 = rf() 56 } else { 57 if ret.Get(0) != nil { 58 r0 = ret.Get(0).([]byte) 59 } 60 } 61 62 return r0 63 } 64 65 // OriginId provides a mock function with given fields: 66 func (_m *IncomingMessageScope) OriginId() flow.Identifier { 67 ret := _m.Called() 68 69 var r0 flow.Identifier 70 if rf, ok := ret.Get(0).(func() flow.Identifier); ok { 71 r0 = rf() 72 } else { 73 if ret.Get(0) != nil { 74 r0 = ret.Get(0).(flow.Identifier) 75 } 76 } 77 78 return r0 79 } 80 81 // PayloadType provides a mock function with given fields: 82 func (_m *IncomingMessageScope) PayloadType() string { 83 ret := _m.Called() 84 85 var r0 string 86 if rf, ok := ret.Get(0).(func() string); ok { 87 r0 = rf() 88 } else { 89 r0 = ret.Get(0).(string) 90 } 91 92 return r0 93 } 94 95 // Proto provides a mock function with given fields: 96 func (_m *IncomingMessageScope) Proto() *message.Message { 97 ret := _m.Called() 98 99 var r0 *message.Message 100 if rf, ok := ret.Get(0).(func() *message.Message); ok { 101 r0 = rf() 102 } else { 103 if ret.Get(0) != nil { 104 r0 = ret.Get(0).(*message.Message) 105 } 106 } 107 108 return r0 109 } 110 111 // Protocol provides a mock function with given fields: 112 func (_m *IncomingMessageScope) Protocol() message.ProtocolType { 113 ret := _m.Called() 114 115 var r0 message.ProtocolType 116 if rf, ok := ret.Get(0).(func() message.ProtocolType); ok { 117 r0 = rf() 118 } else { 119 r0 = ret.Get(0).(message.ProtocolType) 120 } 121 122 return r0 123 } 124 125 // Size provides a mock function with given fields: 126 func (_m *IncomingMessageScope) Size() int { 127 ret := _m.Called() 128 129 var r0 int 130 if rf, ok := ret.Get(0).(func() int); ok { 131 r0 = rf() 132 } else { 133 r0 = ret.Get(0).(int) 134 } 135 136 return r0 137 } 138 139 // TargetIDs provides a mock function with given fields: 140 func (_m *IncomingMessageScope) TargetIDs() flow.IdentifierList { 141 ret := _m.Called() 142 143 var r0 flow.IdentifierList 144 if rf, ok := ret.Get(0).(func() flow.IdentifierList); ok { 145 r0 = rf() 146 } else { 147 if ret.Get(0) != nil { 148 r0 = ret.Get(0).(flow.IdentifierList) 149 } 150 } 151 152 return r0 153 } 154 155 type mockConstructorTestingTNewIncomingMessageScope interface { 156 mock.TestingT 157 Cleanup(func()) 158 } 159 160 // NewIncomingMessageScope creates a new instance of IncomingMessageScope. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 161 func NewIncomingMessageScope(t mockConstructorTestingTNewIncomingMessageScope) *IncomingMessageScope { 162 mock := &IncomingMessageScope{} 163 mock.Mock.Test(t) 164 165 t.Cleanup(func() { mock.AssertExpectations(t) }) 166 167 return mock 168 }