github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/mocknetwork/message_queue.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mocknetwork 4 5 import mock "github.com/stretchr/testify/mock" 6 7 // MessageQueue is an autogenerated mock type for the MessageQueue type 8 type MessageQueue struct { 9 mock.Mock 10 } 11 12 // Insert provides a mock function with given fields: message 13 func (_m *MessageQueue) Insert(message interface{}) error { 14 ret := _m.Called(message) 15 16 var r0 error 17 if rf, ok := ret.Get(0).(func(interface{}) error); ok { 18 r0 = rf(message) 19 } else { 20 r0 = ret.Error(0) 21 } 22 23 return r0 24 } 25 26 // Len provides a mock function with given fields: 27 func (_m *MessageQueue) Len() int { 28 ret := _m.Called() 29 30 var r0 int 31 if rf, ok := ret.Get(0).(func() int); ok { 32 r0 = rf() 33 } else { 34 r0 = ret.Get(0).(int) 35 } 36 37 return r0 38 } 39 40 // Remove provides a mock function with given fields: 41 func (_m *MessageQueue) Remove() interface{} { 42 ret := _m.Called() 43 44 var r0 interface{} 45 if rf, ok := ret.Get(0).(func() interface{}); ok { 46 r0 = rf() 47 } else { 48 if ret.Get(0) != nil { 49 r0 = ret.Get(0).(interface{}) 50 } 51 } 52 53 return r0 54 } 55 56 type mockConstructorTestingTNewMessageQueue interface { 57 mock.TestingT 58 Cleanup(func()) 59 } 60 61 // NewMessageQueue creates a new instance of MessageQueue. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 62 func NewMessageQueue(t mockConstructorTestingTNewMessageQueue) *MessageQueue { 63 mock := &MessageQueue{} 64 mock.Mock.Test(t) 65 66 t.Cleanup(func() { mock.AssertExpectations(t) }) 67 68 return mock 69 }