github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/execution/mock/extendable_storage_snapshot.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	execution "github.com/onflow/flow-go/engine/execution"
     7  	flow "github.com/onflow/flow-go/model/flow"
     8  
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // ExtendableStorageSnapshot is an autogenerated mock type for the ExtendableStorageSnapshot type
    13  type ExtendableStorageSnapshot struct {
    14  	mock.Mock
    15  }
    16  
    17  // Commitment provides a mock function with given fields:
    18  func (_m *ExtendableStorageSnapshot) Commitment() flow.StateCommitment {
    19  	ret := _m.Called()
    20  
    21  	var r0 flow.StateCommitment
    22  	if rf, ok := ret.Get(0).(func() flow.StateCommitment); ok {
    23  		r0 = rf()
    24  	} else {
    25  		if ret.Get(0) != nil {
    26  			r0 = ret.Get(0).(flow.StateCommitment)
    27  		}
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // Extend provides a mock function with given fields: newCommit, updatedRegisters
    34  func (_m *ExtendableStorageSnapshot) Extend(newCommit flow.StateCommitment, updatedRegisters map[flow.RegisterID][]byte) execution.ExtendableStorageSnapshot {
    35  	ret := _m.Called(newCommit, updatedRegisters)
    36  
    37  	var r0 execution.ExtendableStorageSnapshot
    38  	if rf, ok := ret.Get(0).(func(flow.StateCommitment, map[flow.RegisterID][]byte) execution.ExtendableStorageSnapshot); ok {
    39  		r0 = rf(newCommit, updatedRegisters)
    40  	} else {
    41  		if ret.Get(0) != nil {
    42  			r0 = ret.Get(0).(execution.ExtendableStorageSnapshot)
    43  		}
    44  	}
    45  
    46  	return r0
    47  }
    48  
    49  // Get provides a mock function with given fields: id
    50  func (_m *ExtendableStorageSnapshot) Get(id flow.RegisterID) ([]byte, error) {
    51  	ret := _m.Called(id)
    52  
    53  	var r0 []byte
    54  	var r1 error
    55  	if rf, ok := ret.Get(0).(func(flow.RegisterID) ([]byte, error)); ok {
    56  		return rf(id)
    57  	}
    58  	if rf, ok := ret.Get(0).(func(flow.RegisterID) []byte); ok {
    59  		r0 = rf(id)
    60  	} else {
    61  		if ret.Get(0) != nil {
    62  			r0 = ret.Get(0).([]byte)
    63  		}
    64  	}
    65  
    66  	if rf, ok := ret.Get(1).(func(flow.RegisterID) error); ok {
    67  		r1 = rf(id)
    68  	} else {
    69  		r1 = ret.Error(1)
    70  	}
    71  
    72  	return r0, r1
    73  }
    74  
    75  type mockConstructorTestingTNewExtendableStorageSnapshot interface {
    76  	mock.TestingT
    77  	Cleanup(func())
    78  }
    79  
    80  // NewExtendableStorageSnapshot creates a new instance of ExtendableStorageSnapshot. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    81  func NewExtendableStorageSnapshot(t mockConstructorTestingTNewExtendableStorageSnapshot) *ExtendableStorageSnapshot {
    82  	mock := &ExtendableStorageSnapshot{}
    83  	mock.Mock.Test(t)
    84  
    85  	t.Cleanup(func() { mock.AssertExpectations(t) })
    86  
    87  	return mock
    88  }