github.com/koko1123/flow-go-1@v0.29.6/fvm/environment/mock/value_store.go (about)

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