github.com/koko1123/flow-go-1@v0.29.6/network/mocknetwork/violations_consumer.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mocknetwork 4 5 import ( 6 slashing "github.com/koko1123/flow-go-1/network/slashing" 7 mock "github.com/stretchr/testify/mock" 8 ) 9 10 // ViolationsConsumer is an autogenerated mock type for the ViolationsConsumer type 11 type ViolationsConsumer struct { 12 mock.Mock 13 } 14 15 // OnInvalidMsgError provides a mock function with given fields: violation 16 func (_m *ViolationsConsumer) OnInvalidMsgError(violation *slashing.Violation) { 17 _m.Called(violation) 18 } 19 20 // OnSenderEjectedError provides a mock function with given fields: violation 21 func (_m *ViolationsConsumer) OnSenderEjectedError(violation *slashing.Violation) { 22 _m.Called(violation) 23 } 24 25 // OnUnAuthorizedSenderError provides a mock function with given fields: violation 26 func (_m *ViolationsConsumer) OnUnAuthorizedSenderError(violation *slashing.Violation) { 27 _m.Called(violation) 28 } 29 30 // OnUnauthorizedUnicastOnChannel provides a mock function with given fields: violation 31 func (_m *ViolationsConsumer) OnUnauthorizedUnicastOnChannel(violation *slashing.Violation) { 32 _m.Called(violation) 33 } 34 35 // OnUnexpectedError provides a mock function with given fields: violation 36 func (_m *ViolationsConsumer) OnUnexpectedError(violation *slashing.Violation) { 37 _m.Called(violation) 38 } 39 40 // OnUnknownMsgTypeError provides a mock function with given fields: violation 41 func (_m *ViolationsConsumer) OnUnknownMsgTypeError(violation *slashing.Violation) { 42 _m.Called(violation) 43 } 44 45 type mockConstructorTestingTNewViolationsConsumer interface { 46 mock.TestingT 47 Cleanup(func()) 48 } 49 50 // NewViolationsConsumer creates a new instance of ViolationsConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 51 func NewViolationsConsumer(t mockConstructorTestingTNewViolationsConsumer) *ViolationsConsumer { 52 mock := &ViolationsConsumer{} 53 mock.Mock.Test(t) 54 55 t.Cleanup(func() { mock.AssertExpectations(t) }) 56 57 return mock 58 }