github.com/vipernet-xyz/tm@v0.34.24/proxy/mocks/app_conn_consensus.go (about) 1 // Code generated by mockery. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 mock "github.com/stretchr/testify/mock" 7 8 abcicli "github.com/vipernet-xyz/tm/abci/client" 9 10 types "github.com/vipernet-xyz/tm/abci/types" 11 ) 12 13 // AppConnConsensus is an autogenerated mock type for the AppConnConsensus type 14 type AppConnConsensus struct { 15 mock.Mock 16 } 17 18 // BeginBlockSync provides a mock function with given fields: _a0 19 func (_m *AppConnConsensus) BeginBlockSync(_a0 types.RequestBeginBlock) (*types.ResponseBeginBlock, error) { 20 ret := _m.Called(_a0) 21 22 var r0 *types.ResponseBeginBlock 23 if rf, ok := ret.Get(0).(func(types.RequestBeginBlock) *types.ResponseBeginBlock); ok { 24 r0 = rf(_a0) 25 } else { 26 if ret.Get(0) != nil { 27 r0 = ret.Get(0).(*types.ResponseBeginBlock) 28 } 29 } 30 31 var r1 error 32 if rf, ok := ret.Get(1).(func(types.RequestBeginBlock) error); ok { 33 r1 = rf(_a0) 34 } else { 35 r1 = ret.Error(1) 36 } 37 38 return r0, r1 39 } 40 41 // CommitSync provides a mock function with given fields: 42 func (_m *AppConnConsensus) CommitSync() (*types.ResponseCommit, error) { 43 ret := _m.Called() 44 45 var r0 *types.ResponseCommit 46 if rf, ok := ret.Get(0).(func() *types.ResponseCommit); ok { 47 r0 = rf() 48 } else { 49 if ret.Get(0) != nil { 50 r0 = ret.Get(0).(*types.ResponseCommit) 51 } 52 } 53 54 var r1 error 55 if rf, ok := ret.Get(1).(func() error); ok { 56 r1 = rf() 57 } else { 58 r1 = ret.Error(1) 59 } 60 61 return r0, r1 62 } 63 64 // DeliverTxAsync provides a mock function with given fields: _a0 65 func (_m *AppConnConsensus) DeliverTxAsync(_a0 types.RequestDeliverTx) *abcicli.ReqRes { 66 ret := _m.Called(_a0) 67 68 var r0 *abcicli.ReqRes 69 if rf, ok := ret.Get(0).(func(types.RequestDeliverTx) *abcicli.ReqRes); ok { 70 r0 = rf(_a0) 71 } else { 72 if ret.Get(0) != nil { 73 r0 = ret.Get(0).(*abcicli.ReqRes) 74 } 75 } 76 77 return r0 78 } 79 80 // EndBlockSync provides a mock function with given fields: _a0 81 func (_m *AppConnConsensus) EndBlockSync(_a0 types.RequestEndBlock) (*types.ResponseEndBlock, error) { 82 ret := _m.Called(_a0) 83 84 var r0 *types.ResponseEndBlock 85 if rf, ok := ret.Get(0).(func(types.RequestEndBlock) *types.ResponseEndBlock); ok { 86 r0 = rf(_a0) 87 } else { 88 if ret.Get(0) != nil { 89 r0 = ret.Get(0).(*types.ResponseEndBlock) 90 } 91 } 92 93 var r1 error 94 if rf, ok := ret.Get(1).(func(types.RequestEndBlock) error); ok { 95 r1 = rf(_a0) 96 } else { 97 r1 = ret.Error(1) 98 } 99 100 return r0, r1 101 } 102 103 // Error provides a mock function with given fields: 104 func (_m *AppConnConsensus) Error() error { 105 ret := _m.Called() 106 107 var r0 error 108 if rf, ok := ret.Get(0).(func() error); ok { 109 r0 = rf() 110 } else { 111 r0 = ret.Error(0) 112 } 113 114 return r0 115 } 116 117 // InitChainSync provides a mock function with given fields: _a0 118 func (_m *AppConnConsensus) InitChainSync(_a0 types.RequestInitChain) (*types.ResponseInitChain, error) { 119 ret := _m.Called(_a0) 120 121 var r0 *types.ResponseInitChain 122 if rf, ok := ret.Get(0).(func(types.RequestInitChain) *types.ResponseInitChain); ok { 123 r0 = rf(_a0) 124 } else { 125 if ret.Get(0) != nil { 126 r0 = ret.Get(0).(*types.ResponseInitChain) 127 } 128 } 129 130 var r1 error 131 if rf, ok := ret.Get(1).(func(types.RequestInitChain) error); ok { 132 r1 = rf(_a0) 133 } else { 134 r1 = ret.Error(1) 135 } 136 137 return r0, r1 138 } 139 140 // SetResponseCallback provides a mock function with given fields: _a0 141 func (_m *AppConnConsensus) SetResponseCallback(_a0 abcicli.Callback) { 142 _m.Called(_a0) 143 } 144 145 type NewAppConnConsensusT interface { 146 mock.TestingT 147 Cleanup(func()) 148 } 149 150 // NewAppConnConsensus creates a new instance of AppConnConsensus. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 151 func NewAppConnConsensus(t NewAppConnConsensusT) *AppConnConsensus { 152 mock := &AppConnConsensus{} 153 mock.Mock.Test(t) 154 155 t.Cleanup(func() { mock.AssertExpectations(t) }) 156 157 return mock 158 }