github.com/aakash4dev/cometbft@v0.38.2/statesync/mocks/state_provider.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	state "github.com/aakash4dev/cometbft/state"
     9  	mock "github.com/stretchr/testify/mock"
    10  
    11  	types "github.com/aakash4dev/cometbft/types"
    12  )
    13  
    14  // StateProvider is an autogenerated mock type for the StateProvider type
    15  type StateProvider struct {
    16  	mock.Mock
    17  }
    18  
    19  // AppHash provides a mock function with given fields: ctx, height
    20  func (_m *StateProvider) AppHash(ctx context.Context, height uint64) ([]byte, error) {
    21  	ret := _m.Called(ctx, height)
    22  
    23  	var r0 []byte
    24  	var r1 error
    25  	if rf, ok := ret.Get(0).(func(context.Context, uint64) ([]byte, error)); ok {
    26  		return rf(ctx, height)
    27  	}
    28  	if rf, ok := ret.Get(0).(func(context.Context, uint64) []byte); ok {
    29  		r0 = rf(ctx, height)
    30  	} else {
    31  		if ret.Get(0) != nil {
    32  			r0 = ret.Get(0).([]byte)
    33  		}
    34  	}
    35  
    36  	if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok {
    37  		r1 = rf(ctx, height)
    38  	} else {
    39  		r1 = ret.Error(1)
    40  	}
    41  
    42  	return r0, r1
    43  }
    44  
    45  // Commit provides a mock function with given fields: ctx, height
    46  func (_m *StateProvider) Commit(ctx context.Context, height uint64) (*types.Commit, error) {
    47  	ret := _m.Called(ctx, height)
    48  
    49  	var r0 *types.Commit
    50  	var r1 error
    51  	if rf, ok := ret.Get(0).(func(context.Context, uint64) (*types.Commit, error)); ok {
    52  		return rf(ctx, height)
    53  	}
    54  	if rf, ok := ret.Get(0).(func(context.Context, uint64) *types.Commit); ok {
    55  		r0 = rf(ctx, height)
    56  	} else {
    57  		if ret.Get(0) != nil {
    58  			r0 = ret.Get(0).(*types.Commit)
    59  		}
    60  	}
    61  
    62  	if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok {
    63  		r1 = rf(ctx, height)
    64  	} else {
    65  		r1 = ret.Error(1)
    66  	}
    67  
    68  	return r0, r1
    69  }
    70  
    71  // State provides a mock function with given fields: ctx, height
    72  func (_m *StateProvider) State(ctx context.Context, height uint64) (state.State, error) {
    73  	ret := _m.Called(ctx, height)
    74  
    75  	var r0 state.State
    76  	var r1 error
    77  	if rf, ok := ret.Get(0).(func(context.Context, uint64) (state.State, error)); ok {
    78  		return rf(ctx, height)
    79  	}
    80  	if rf, ok := ret.Get(0).(func(context.Context, uint64) state.State); ok {
    81  		r0 = rf(ctx, height)
    82  	} else {
    83  		r0 = ret.Get(0).(state.State)
    84  	}
    85  
    86  	if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok {
    87  		r1 = rf(ctx, height)
    88  	} else {
    89  		r1 = ret.Error(1)
    90  	}
    91  
    92  	return r0, r1
    93  }
    94  
    95  // NewStateProvider creates a new instance of StateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    96  // The first argument is typically a *testing.T value.
    97  func NewStateProvider(t interface {
    98  	mock.TestingT
    99  	Cleanup(func())
   100  }) *StateProvider {
   101  	mock := &StateProvider{}
   102  	mock.Mock.Test(t)
   103  
   104  	t.Cleanup(func() { mock.AssertExpectations(t) })
   105  
   106  	return mock
   107  }