github.com/Finschia/ostracon@v1.1.5/state/mocks/store.go (about)

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