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