github.com/badrootd/celestia-core@v0.0.0-20240305091328-aa4207a4b25d/state/mocks/store.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	state "github.com/badrootd/celestia-core/state"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	tendermintstate "github.com/badrootd/celestia-core/proto/tendermint/state"
    10  
    11  	types "github.com/badrootd/celestia-core/types"
    12  )
    13  
    14  // Store is an autogenerated mock type for the Store type
    15  type Store struct {
    16  	mock.Mock
    17  }
    18  
    19  // Bootstrap provides a mock function with given fields: _a0
    20  func (_m *Store) Bootstrap(_a0 state.State) error {
    21  	ret := _m.Called(_a0)
    22  
    23  	var r0 error
    24  	if rf, ok := ret.Get(0).(func(state.State) error); ok {
    25  		r0 = rf(_a0)
    26  	} else {
    27  		r0 = ret.Error(0)
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // Close provides a mock function with given fields:
    34  func (_m *Store) Close() error {
    35  	ret := _m.Called()
    36  
    37  	var r0 error
    38  	if rf, ok := ret.Get(0).(func() error); ok {
    39  		r0 = rf()
    40  	} else {
    41  		r0 = ret.Error(0)
    42  	}
    43  
    44  	return r0
    45  }
    46  
    47  // Load provides a mock function with given fields:
    48  func (_m *Store) Load() (state.State, error) {
    49  	ret := _m.Called()
    50  
    51  	var r0 state.State
    52  	if rf, ok := ret.Get(0).(func() state.State); ok {
    53  		r0 = rf()
    54  	} else {
    55  		r0 = ret.Get(0).(state.State)
    56  	}
    57  
    58  	var r1 error
    59  	if rf, ok := ret.Get(1).(func() error); ok {
    60  		r1 = rf()
    61  	} else {
    62  		r1 = ret.Error(1)
    63  	}
    64  
    65  	return r0, r1
    66  }
    67  
    68  // LoadABCIResponses provides a mock function with given fields: _a0
    69  func (_m *Store) LoadABCIResponses(_a0 int64) (*tendermintstate.ABCIResponses, error) {
    70  	ret := _m.Called(_a0)
    71  
    72  	var r0 *tendermintstate.ABCIResponses
    73  	if rf, ok := ret.Get(0).(func(int64) *tendermintstate.ABCIResponses); ok {
    74  		r0 = rf(_a0)
    75  	} else {
    76  		if ret.Get(0) != nil {
    77  			r0 = ret.Get(0).(*tendermintstate.ABCIResponses)
    78  		}
    79  	}
    80  
    81  	var r1 error
    82  	if rf, ok := ret.Get(1).(func(int64) error); ok {
    83  		r1 = rf(_a0)
    84  	} else {
    85  		r1 = ret.Error(1)
    86  	}
    87  
    88  	return r0, r1
    89  }
    90  
    91  // LoadConsensusParams provides a mock function with given fields: _a0
    92  func (_m *Store) LoadConsensusParams(_a0 int64) (types.ConsensusParams, error) {
    93  	ret := _m.Called(_a0)
    94  
    95  	var r0 types.ConsensusParams
    96  	if rf, ok := ret.Get(0).(func(int64) types.ConsensusParams); ok {
    97  		r0 = rf(_a0)
    98  	} else {
    99  		r0 = ret.Get(0).(types.ConsensusParams)
   100  	}
   101  
   102  	var r1 error
   103  	if rf, ok := ret.Get(1).(func(int64) error); ok {
   104  		r1 = rf(_a0)
   105  	} else {
   106  		r1 = ret.Error(1)
   107  	}
   108  
   109  	return r0, r1
   110  }
   111  
   112  // LoadFromDBOrGenesisDoc provides a mock function with given fields: _a0
   113  func (_m *Store) LoadFromDBOrGenesisDoc(_a0 *types.GenesisDoc) (state.State, error) {
   114  	ret := _m.Called(_a0)
   115  
   116  	var r0 state.State
   117  	if rf, ok := ret.Get(0).(func(*types.GenesisDoc) state.State); ok {
   118  		r0 = rf(_a0)
   119  	} else {
   120  		r0 = ret.Get(0).(state.State)
   121  	}
   122  
   123  	var r1 error
   124  	if rf, ok := ret.Get(1).(func(*types.GenesisDoc) error); ok {
   125  		r1 = rf(_a0)
   126  	} else {
   127  		r1 = ret.Error(1)
   128  	}
   129  
   130  	return r0, r1
   131  }
   132  
   133  // LoadFromDBOrGenesisFile provides a mock function with given fields: _a0
   134  func (_m *Store) LoadFromDBOrGenesisFile(_a0 string) (state.State, error) {
   135  	ret := _m.Called(_a0)
   136  
   137  	var r0 state.State
   138  	if rf, ok := ret.Get(0).(func(string) state.State); ok {
   139  		r0 = rf(_a0)
   140  	} else {
   141  		r0 = ret.Get(0).(state.State)
   142  	}
   143  
   144  	var r1 error
   145  	if rf, ok := ret.Get(1).(func(string) error); ok {
   146  		r1 = rf(_a0)
   147  	} else {
   148  		r1 = ret.Error(1)
   149  	}
   150  
   151  	return r0, r1
   152  }
   153  
   154  // LoadLastABCIResponse provides a mock function with given fields: _a0
   155  func (_m *Store) LoadLastABCIResponse(_a0 int64) (*tendermintstate.ABCIResponses, error) {
   156  	ret := _m.Called(_a0)
   157  
   158  	var r0 *tendermintstate.ABCIResponses
   159  	if rf, ok := ret.Get(0).(func(int64) *tendermintstate.ABCIResponses); ok {
   160  		r0 = rf(_a0)
   161  	} else {
   162  		if ret.Get(0) != nil {
   163  			r0 = ret.Get(0).(*tendermintstate.ABCIResponses)
   164  		}
   165  	}
   166  
   167  	var r1 error
   168  	if rf, ok := ret.Get(1).(func(int64) error); ok {
   169  		r1 = rf(_a0)
   170  	} else {
   171  		r1 = ret.Error(1)
   172  	}
   173  
   174  	return r0, r1
   175  }
   176  
   177  // LoadValidators provides a mock function with given fields: _a0
   178  func (_m *Store) LoadValidators(_a0 int64) (*types.ValidatorSet, error) {
   179  	ret := _m.Called(_a0)
   180  
   181  	var r0 *types.ValidatorSet
   182  	if rf, ok := ret.Get(0).(func(int64) *types.ValidatorSet); ok {
   183  		r0 = rf(_a0)
   184  	} else {
   185  		if ret.Get(0) != nil {
   186  			r0 = ret.Get(0).(*types.ValidatorSet)
   187  		}
   188  	}
   189  
   190  	var r1 error
   191  	if rf, ok := ret.Get(1).(func(int64) error); ok {
   192  		r1 = rf(_a0)
   193  	} else {
   194  		r1 = ret.Error(1)
   195  	}
   196  
   197  	return r0, r1
   198  }
   199  
   200  // PruneStates provides a mock function with given fields: _a0, _a1
   201  func (_m *Store) PruneStates(_a0 int64, _a1 int64) error {
   202  	ret := _m.Called(_a0, _a1)
   203  
   204  	var r0 error
   205  	if rf, ok := ret.Get(0).(func(int64, int64) error); ok {
   206  		r0 = rf(_a0, _a1)
   207  	} else {
   208  		r0 = ret.Error(0)
   209  	}
   210  
   211  	return r0
   212  }
   213  
   214  // Save provides a mock function with given fields: _a0
   215  func (_m *Store) Save(_a0 state.State) error {
   216  	ret := _m.Called(_a0)
   217  
   218  	var r0 error
   219  	if rf, ok := ret.Get(0).(func(state.State) error); ok {
   220  		r0 = rf(_a0)
   221  	} else {
   222  		r0 = ret.Error(0)
   223  	}
   224  
   225  	return r0
   226  }
   227  
   228  // SaveABCIResponses provides a mock function with given fields: _a0, _a1
   229  func (_m *Store) SaveABCIResponses(_a0 int64, _a1 *tendermintstate.ABCIResponses) error {
   230  	ret := _m.Called(_a0, _a1)
   231  
   232  	var r0 error
   233  	if rf, ok := ret.Get(0).(func(int64, *tendermintstate.ABCIResponses) error); ok {
   234  		r0 = rf(_a0, _a1)
   235  	} else {
   236  		r0 = ret.Error(0)
   237  	}
   238  
   239  	return r0
   240  }
   241  
   242  type mockConstructorTestingTNewStore interface {
   243  	mock.TestingT
   244  	Cleanup(func())
   245  }
   246  
   247  // NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   248  func NewStore(t mockConstructorTestingTNewStore) *Store {
   249  	mock := &Store{}
   250  	mock.Mock.Test(t)
   251  
   252  	t.Cleanup(func() { mock.AssertExpectations(t) })
   253  
   254  	return mock
   255  }