github.com/aakash4dev/cometbft@v0.38.2/proxy/mocks/app_conn_consensus.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  
    10  	types "github.com/aakash4dev/cometbft/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  // Commit provides a mock function with given fields: _a0
    19  func (_m *AppConnConsensus) Commit(_a0 context.Context) (*types.ResponseCommit, error) {
    20  	ret := _m.Called(_a0)
    21  
    22  	var r0 *types.ResponseCommit
    23  	var r1 error
    24  	if rf, ok := ret.Get(0).(func(context.Context) (*types.ResponseCommit, error)); ok {
    25  		return rf(_a0)
    26  	}
    27  	if rf, ok := ret.Get(0).(func(context.Context) *types.ResponseCommit); ok {
    28  		r0 = rf(_a0)
    29  	} else {
    30  		if ret.Get(0) != nil {
    31  			r0 = ret.Get(0).(*types.ResponseCommit)
    32  		}
    33  	}
    34  
    35  	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
    36  		r1 = rf(_a0)
    37  	} else {
    38  		r1 = ret.Error(1)
    39  	}
    40  
    41  	return r0, r1
    42  }
    43  
    44  // Error provides a mock function with given fields:
    45  func (_m *AppConnConsensus) Error() error {
    46  	ret := _m.Called()
    47  
    48  	var r0 error
    49  	if rf, ok := ret.Get(0).(func() error); ok {
    50  		r0 = rf()
    51  	} else {
    52  		r0 = ret.Error(0)
    53  	}
    54  
    55  	return r0
    56  }
    57  
    58  // ExtendVote provides a mock function with given fields: _a0, _a1
    59  func (_m *AppConnConsensus) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) {
    60  	ret := _m.Called(_a0, _a1)
    61  
    62  	var r0 *types.ResponseExtendVote
    63  	var r1 error
    64  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestExtendVote) (*types.ResponseExtendVote, error)); ok {
    65  		return rf(_a0, _a1)
    66  	}
    67  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestExtendVote) *types.ResponseExtendVote); ok {
    68  		r0 = rf(_a0, _a1)
    69  	} else {
    70  		if ret.Get(0) != nil {
    71  			r0 = ret.Get(0).(*types.ResponseExtendVote)
    72  		}
    73  	}
    74  
    75  	if rf, ok := ret.Get(1).(func(context.Context, *types.RequestExtendVote) error); ok {
    76  		r1 = rf(_a0, _a1)
    77  	} else {
    78  		r1 = ret.Error(1)
    79  	}
    80  
    81  	return r0, r1
    82  }
    83  
    84  // FinalizeBlock provides a mock function with given fields: _a0, _a1
    85  func (_m *AppConnConsensus) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) {
    86  	ret := _m.Called(_a0, _a1)
    87  
    88  	var r0 *types.ResponseFinalizeBlock
    89  	var r1 error
    90  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error)); ok {
    91  		return rf(_a0, _a1)
    92  	}
    93  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFinalizeBlock) *types.ResponseFinalizeBlock); ok {
    94  		r0 = rf(_a0, _a1)
    95  	} else {
    96  		if ret.Get(0) != nil {
    97  			r0 = ret.Get(0).(*types.ResponseFinalizeBlock)
    98  		}
    99  	}
   100  
   101  	if rf, ok := ret.Get(1).(func(context.Context, *types.RequestFinalizeBlock) error); ok {
   102  		r1 = rf(_a0, _a1)
   103  	} else {
   104  		r1 = ret.Error(1)
   105  	}
   106  
   107  	return r0, r1
   108  }
   109  
   110  // InitChain provides a mock function with given fields: _a0, _a1
   111  func (_m *AppConnConsensus) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) {
   112  	ret := _m.Called(_a0, _a1)
   113  
   114  	var r0 *types.ResponseInitChain
   115  	var r1 error
   116  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInitChain) (*types.ResponseInitChain, error)); ok {
   117  		return rf(_a0, _a1)
   118  	}
   119  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInitChain) *types.ResponseInitChain); ok {
   120  		r0 = rf(_a0, _a1)
   121  	} else {
   122  		if ret.Get(0) != nil {
   123  			r0 = ret.Get(0).(*types.ResponseInitChain)
   124  		}
   125  	}
   126  
   127  	if rf, ok := ret.Get(1).(func(context.Context, *types.RequestInitChain) error); ok {
   128  		r1 = rf(_a0, _a1)
   129  	} else {
   130  		r1 = ret.Error(1)
   131  	}
   132  
   133  	return r0, r1
   134  }
   135  
   136  // PrepareProposal provides a mock function with given fields: _a0, _a1
   137  func (_m *AppConnConsensus) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) {
   138  	ret := _m.Called(_a0, _a1)
   139  
   140  	var r0 *types.ResponsePrepareProposal
   141  	var r1 error
   142  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error)); ok {
   143  		return rf(_a0, _a1)
   144  	}
   145  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestPrepareProposal) *types.ResponsePrepareProposal); ok {
   146  		r0 = rf(_a0, _a1)
   147  	} else {
   148  		if ret.Get(0) != nil {
   149  			r0 = ret.Get(0).(*types.ResponsePrepareProposal)
   150  		}
   151  	}
   152  
   153  	if rf, ok := ret.Get(1).(func(context.Context, *types.RequestPrepareProposal) error); ok {
   154  		r1 = rf(_a0, _a1)
   155  	} else {
   156  		r1 = ret.Error(1)
   157  	}
   158  
   159  	return r0, r1
   160  }
   161  
   162  // ProcessProposal provides a mock function with given fields: _a0, _a1
   163  func (_m *AppConnConsensus) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) {
   164  	ret := _m.Called(_a0, _a1)
   165  
   166  	var r0 *types.ResponseProcessProposal
   167  	var r1 error
   168  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestProcessProposal) (*types.ResponseProcessProposal, error)); ok {
   169  		return rf(_a0, _a1)
   170  	}
   171  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestProcessProposal) *types.ResponseProcessProposal); ok {
   172  		r0 = rf(_a0, _a1)
   173  	} else {
   174  		if ret.Get(0) != nil {
   175  			r0 = ret.Get(0).(*types.ResponseProcessProposal)
   176  		}
   177  	}
   178  
   179  	if rf, ok := ret.Get(1).(func(context.Context, *types.RequestProcessProposal) error); ok {
   180  		r1 = rf(_a0, _a1)
   181  	} else {
   182  		r1 = ret.Error(1)
   183  	}
   184  
   185  	return r0, r1
   186  }
   187  
   188  // VerifyVoteExtension provides a mock function with given fields: _a0, _a1
   189  func (_m *AppConnConsensus) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) {
   190  	ret := _m.Called(_a0, _a1)
   191  
   192  	var r0 *types.ResponseVerifyVoteExtension
   193  	var r1 error
   194  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error)); ok {
   195  		return rf(_a0, _a1)
   196  	}
   197  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestVerifyVoteExtension) *types.ResponseVerifyVoteExtension); ok {
   198  		r0 = rf(_a0, _a1)
   199  	} else {
   200  		if ret.Get(0) != nil {
   201  			r0 = ret.Get(0).(*types.ResponseVerifyVoteExtension)
   202  		}
   203  	}
   204  
   205  	if rf, ok := ret.Get(1).(func(context.Context, *types.RequestVerifyVoteExtension) error); ok {
   206  		r1 = rf(_a0, _a1)
   207  	} else {
   208  		r1 = ret.Error(1)
   209  	}
   210  
   211  	return r0, r1
   212  }
   213  
   214  // 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.
   215  // The first argument is typically a *testing.T value.
   216  func NewAppConnConsensus(t interface {
   217  	mock.TestingT
   218  	Cleanup(func())
   219  }) *AppConnConsensus {
   220  	mock := &AppConnConsensus{}
   221  	mock.Mock.Test(t)
   222  
   223  	t.Cleanup(func() { mock.AssertExpectations(t) })
   224  
   225  	return mock
   226  }