github.com/cosmos/cosmos-sdk@v0.50.10/testutil/mock/types_handler.go (about) 1 // Code generated by MockGen. 2 // Source: types/handler.go 3 // Manual changes: 4 // + AnteHandler(...): calling `next` at the end of the function to run all ante handler chain. 5 // + PostHandler(...): calling `next` at the end of the function to run all post handler chain. 6 7 // Package mock is a generated GoMock package. 8 package mock 9 10 import ( 11 reflect "reflect" 12 13 gomock "github.com/golang/mock/gomock" 14 15 types "github.com/cosmos/cosmos-sdk/types" 16 ) 17 18 // MockAnteDecorator is a mock of AnteDecorator interface. 19 type MockAnteDecorator struct { 20 ctrl *gomock.Controller 21 recorder *MockAnteDecoratorMockRecorder 22 } 23 24 // MockAnteDecoratorMockRecorder is the mock recorder for MockAnteDecorator. 25 type MockAnteDecoratorMockRecorder struct { 26 mock *MockAnteDecorator 27 } 28 29 // NewMockAnteDecorator creates a new mock instance. 30 func NewMockAnteDecorator(ctrl *gomock.Controller) *MockAnteDecorator { 31 mock := &MockAnteDecorator{ctrl: ctrl} 32 mock.recorder = &MockAnteDecoratorMockRecorder{mock} 33 return mock 34 } 35 36 // EXPECT returns an object that allows the caller to indicate expected use. 37 func (m *MockAnteDecorator) EXPECT() *MockAnteDecoratorMockRecorder { 38 return m.recorder 39 } 40 41 // AnteHandle mocks base method. 42 func (m *MockAnteDecorator) AnteHandle(ctx types.Context, tx types.Tx, simulate bool, next types.AnteHandler) (types.Context, error) { 43 m.ctrl.T.Helper() 44 m.ctrl.Call(m, "AnteHandle", ctx, tx, simulate, next) 45 // NOTE: we need to edit a generated code to call the "next handler" 46 return next(ctx, tx, simulate) 47 } 48 49 // AnteHandle indicates an expected call of AnteHandle. 50 func (mr *MockAnteDecoratorMockRecorder) AnteHandle(ctx, tx, simulate, next interface{}) *gomock.Call { 51 mr.mock.ctrl.T.Helper() 52 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnteHandle", reflect.TypeOf((*MockAnteDecorator)(nil).AnteHandle), ctx, tx, simulate, next) 53 } 54 55 // MockPostDecorator is a mock of PostDecorator interface. 56 type MockPostDecorator struct { 57 ctrl *gomock.Controller 58 recorder *MockPostDecoratorMockRecorder 59 } 60 61 // MockPostDecoratorMockRecorder is the mock recorder for MockPostDecorator. 62 type MockPostDecoratorMockRecorder struct { 63 mock *MockPostDecorator 64 } 65 66 // NewMockPostDecorator creates a new mock instance. 67 func NewMockPostDecorator(ctrl *gomock.Controller) *MockPostDecorator { 68 mock := &MockPostDecorator{ctrl: ctrl} 69 mock.recorder = &MockPostDecoratorMockRecorder{mock} 70 return mock 71 } 72 73 // EXPECT returns an object that allows the caller to indicate expected use. 74 func (m *MockPostDecorator) EXPECT() *MockPostDecoratorMockRecorder { 75 return m.recorder 76 } 77 78 // PostHandle mocks base method. 79 func (m *MockPostDecorator) PostHandle(ctx types.Context, tx types.Tx, simulate, success bool, next types.PostHandler) (types.Context, error) { 80 m.ctrl.T.Helper() 81 m.ctrl.Call(m, "PostHandle", ctx, tx, simulate, success, next) 82 // NOTE: we need to edit the generated code to call the "next handler" 83 return next(ctx, tx, simulate, success) 84 } 85 86 // PostHandle indicates an expected call of PostHandle. 87 func (mr *MockPostDecoratorMockRecorder) PostHandle(ctx, tx, simulate, success, next interface{}) *gomock.Call { 88 mr.mock.ctrl.T.Helper() 89 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PostHandle", reflect.TypeOf((*MockPostDecorator)(nil).PostHandle), ctx, tx, simulate, success, next) 90 }