github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/internal/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  	mock "github.com/stretchr/testify/mock"
     9  	state "github.com/ari-anchor/sei-tendermint/internal/state"
    10  
    11  	types "github.com/ari-anchor/sei-tendermint/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  	if rf, ok := ret.Get(0).(func(context.Context, uint64) []byte); ok {
    25  		r0 = rf(ctx, height)
    26  	} else {
    27  		if ret.Get(0) != nil {
    28  			r0 = ret.Get(0).([]byte)
    29  		}
    30  	}
    31  
    32  	var r1 error
    33  	if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok {
    34  		r1 = rf(ctx, height)
    35  	} else {
    36  		r1 = ret.Error(1)
    37  	}
    38  
    39  	return r0, r1
    40  }
    41  
    42  // Commit provides a mock function with given fields: ctx, height
    43  func (_m *StateProvider) Commit(ctx context.Context, height uint64) (*types.Commit, error) {
    44  	ret := _m.Called(ctx, height)
    45  
    46  	var r0 *types.Commit
    47  	if rf, ok := ret.Get(0).(func(context.Context, uint64) *types.Commit); ok {
    48  		r0 = rf(ctx, height)
    49  	} else {
    50  		if ret.Get(0) != nil {
    51  			r0 = ret.Get(0).(*types.Commit)
    52  		}
    53  	}
    54  
    55  	var r1 error
    56  	if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok {
    57  		r1 = rf(ctx, height)
    58  	} else {
    59  		r1 = ret.Error(1)
    60  	}
    61  
    62  	return r0, r1
    63  }
    64  
    65  // State provides a mock function with given fields: ctx, height
    66  func (_m *StateProvider) State(ctx context.Context, height uint64) (state.State, error) {
    67  	ret := _m.Called(ctx, height)
    68  
    69  	var r0 state.State
    70  	if rf, ok := ret.Get(0).(func(context.Context, uint64) state.State); ok {
    71  		r0 = rf(ctx, height)
    72  	} else {
    73  		r0 = ret.Get(0).(state.State)
    74  	}
    75  
    76  	var r1 error
    77  	if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok {
    78  		r1 = rf(ctx, height)
    79  	} else {
    80  		r1 = ret.Error(1)
    81  	}
    82  
    83  	return r0, r1
    84  }
    85  
    86  type mockConstructorTestingTNewStateProvider interface {
    87  	mock.TestingT
    88  	Cleanup(func())
    89  }
    90  
    91  // 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.
    92  func NewStateProvider(t mockConstructorTestingTNewStateProvider) *StateProvider {
    93  	mock := &StateProvider{}
    94  	mock.Mock.Test(t)
    95  
    96  	t.Cleanup(func() { mock.AssertExpectations(t) })
    97  
    98  	return mock
    99  }