github.com/PikeEcosystem/tendermint@v0.0.4/state/mocks/batch.go (about) 1 // Code generated by mockery v2.15.0. DO NOT EDIT. 2 3 package mocks 4 5 import mock "github.com/stretchr/testify/mock" 6 7 // Batch is an autogenerated mock type for the Batch type 8 type Batch struct { 9 mock.Mock 10 } 11 12 // Close provides a mock function with given fields: 13 func (_m *Batch) Close() error { 14 ret := _m.Called() 15 16 var r0 error 17 if rf, ok := ret.Get(0).(func() error); ok { 18 r0 = rf() 19 } else { 20 r0 = ret.Error(0) 21 } 22 23 return r0 24 } 25 26 // Delete provides a mock function with given fields: key 27 func (_m *Batch) Delete(key []byte) error { 28 ret := _m.Called(key) 29 30 var r0 error 31 if rf, ok := ret.Get(0).(func([]byte) error); ok { 32 r0 = rf(key) 33 } else { 34 r0 = ret.Error(0) 35 } 36 37 return r0 38 } 39 40 // Set provides a mock function with given fields: key, value 41 func (_m *Batch) Set(key []byte, value []byte) error { 42 ret := _m.Called(key, value) 43 44 var r0 error 45 if rf, ok := ret.Get(0).(func([]byte, []byte) error); ok { 46 r0 = rf(key, value) 47 } else { 48 r0 = ret.Error(0) 49 } 50 51 return r0 52 } 53 54 // Write provides a mock function with given fields: 55 func (_m *Batch) Write() error { 56 ret := _m.Called() 57 58 var r0 error 59 if rf, ok := ret.Get(0).(func() error); ok { 60 r0 = rf() 61 } else { 62 r0 = ret.Error(0) 63 } 64 65 return r0 66 } 67 68 // WriteSync provides a mock function with given fields: 69 func (_m *Batch) WriteSync() error { 70 ret := _m.Called() 71 72 var r0 error 73 if rf, ok := ret.Get(0).(func() error); ok { 74 r0 = rf() 75 } else { 76 r0 = ret.Error(0) 77 } 78 79 return r0 80 } 81 82 type mockConstructorTestingTNewBatch interface { 83 mock.TestingT 84 Cleanup(func()) 85 } 86 87 // NewBatch creates a new instance of Batch. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 88 func NewBatch(t mockConstructorTestingTNewBatch) *Batch { 89 mock := &Batch{} 90 mock.Mock.Test(t) 91 92 t.Cleanup(func() { mock.AssertExpectations(t) }) 93 94 return mock 95 }