github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mock/mempool_metrics.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 module "github.com/onflow/flow-go/module" 7 mock "github.com/stretchr/testify/mock" 8 ) 9 10 // MempoolMetrics is an autogenerated mock type for the MempoolMetrics type 11 type MempoolMetrics struct { 12 mock.Mock 13 } 14 15 // MempoolEntries provides a mock function with given fields: resource, entries 16 func (_m *MempoolMetrics) MempoolEntries(resource string, entries uint) { 17 _m.Called(resource, entries) 18 } 19 20 // Register provides a mock function with given fields: resource, entriesFunc 21 func (_m *MempoolMetrics) Register(resource string, entriesFunc module.EntriesFunc) error { 22 ret := _m.Called(resource, entriesFunc) 23 24 var r0 error 25 if rf, ok := ret.Get(0).(func(string, module.EntriesFunc) error); ok { 26 r0 = rf(resource, entriesFunc) 27 } else { 28 r0 = ret.Error(0) 29 } 30 31 return r0 32 } 33 34 type mockConstructorTestingTNewMempoolMetrics interface { 35 mock.TestingT 36 Cleanup(func()) 37 } 38 39 // NewMempoolMetrics creates a new instance of MempoolMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 40 func NewMempoolMetrics(t mockConstructorTestingTNewMempoolMetrics) *MempoolMetrics { 41 mock := &MempoolMetrics{} 42 mock.Mock.Test(t) 43 44 t.Cleanup(func() { mock.AssertExpectations(t) }) 45 46 return mock 47 }