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

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	flow "github.com/onflow/flow-go/model/flow"
     7  	mock "github.com/stretchr/testify/mock"
     8  )
     9  
    10  // Ledger is an autogenerated mock type for the Ledger type
    11  type Ledger struct {
    12  	mock.Mock
    13  }
    14  
    15  // EmptyStateCommitment provides a mock function with given fields:
    16  func (_m *Ledger) EmptyStateCommitment() flow.StateCommitment {
    17  	ret := _m.Called()
    18  
    19  	var r0 flow.StateCommitment
    20  	if rf, ok := ret.Get(0).(func() flow.StateCommitment); ok {
    21  		r0 = rf()
    22  	} else {
    23  		if ret.Get(0) != nil {
    24  			r0 = ret.Get(0).(flow.StateCommitment)
    25  		}
    26  	}
    27  
    28  	return r0
    29  }
    30  
    31  // GetRegisters provides a mock function with given fields: registerIDs, stateCommitment
    32  func (_m *Ledger) GetRegisters(registerIDs []flow.RegisterID, stateCommitment flow.StateCommitment) ([][]byte, error) {
    33  	ret := _m.Called(registerIDs, stateCommitment)
    34  
    35  	var r0 [][]byte
    36  	var r1 error
    37  	if rf, ok := ret.Get(0).(func([]flow.RegisterID, flow.StateCommitment) ([][]byte, error)); ok {
    38  		return rf(registerIDs, stateCommitment)
    39  	}
    40  	if rf, ok := ret.Get(0).(func([]flow.RegisterID, flow.StateCommitment) [][]byte); ok {
    41  		r0 = rf(registerIDs, stateCommitment)
    42  	} else {
    43  		if ret.Get(0) != nil {
    44  			r0 = ret.Get(0).([][]byte)
    45  		}
    46  	}
    47  
    48  	if rf, ok := ret.Get(1).(func([]flow.RegisterID, flow.StateCommitment) error); ok {
    49  		r1 = rf(registerIDs, stateCommitment)
    50  	} else {
    51  		r1 = ret.Error(1)
    52  	}
    53  
    54  	return r0, r1
    55  }
    56  
    57  // GetRegistersWithProof provides a mock function with given fields: registerIDs, stateCommitment
    58  func (_m *Ledger) GetRegistersWithProof(registerIDs []flow.RegisterID, stateCommitment flow.StateCommitment) ([][]byte, [][]byte, error) {
    59  	ret := _m.Called(registerIDs, stateCommitment)
    60  
    61  	var r0 [][]byte
    62  	var r1 [][]byte
    63  	var r2 error
    64  	if rf, ok := ret.Get(0).(func([]flow.RegisterID, flow.StateCommitment) ([][]byte, [][]byte, error)); ok {
    65  		return rf(registerIDs, stateCommitment)
    66  	}
    67  	if rf, ok := ret.Get(0).(func([]flow.RegisterID, flow.StateCommitment) [][]byte); ok {
    68  		r0 = rf(registerIDs, stateCommitment)
    69  	} else {
    70  		if ret.Get(0) != nil {
    71  			r0 = ret.Get(0).([][]byte)
    72  		}
    73  	}
    74  
    75  	if rf, ok := ret.Get(1).(func([]flow.RegisterID, flow.StateCommitment) [][]byte); ok {
    76  		r1 = rf(registerIDs, stateCommitment)
    77  	} else {
    78  		if ret.Get(1) != nil {
    79  			r1 = ret.Get(1).([][]byte)
    80  		}
    81  	}
    82  
    83  	if rf, ok := ret.Get(2).(func([]flow.RegisterID, flow.StateCommitment) error); ok {
    84  		r2 = rf(registerIDs, stateCommitment)
    85  	} else {
    86  		r2 = ret.Error(2)
    87  	}
    88  
    89  	return r0, r1, r2
    90  }
    91  
    92  // UpdateRegisters provides a mock function with given fields: registerIDs, values, stateCommitment
    93  func (_m *Ledger) UpdateRegisters(registerIDs []flow.RegisterID, values [][]byte, stateCommitment flow.StateCommitment) (flow.StateCommitment, error) {
    94  	ret := _m.Called(registerIDs, values, stateCommitment)
    95  
    96  	var r0 flow.StateCommitment
    97  	var r1 error
    98  	if rf, ok := ret.Get(0).(func([]flow.RegisterID, [][]byte, flow.StateCommitment) (flow.StateCommitment, error)); ok {
    99  		return rf(registerIDs, values, stateCommitment)
   100  	}
   101  	if rf, ok := ret.Get(0).(func([]flow.RegisterID, [][]byte, flow.StateCommitment) flow.StateCommitment); ok {
   102  		r0 = rf(registerIDs, values, stateCommitment)
   103  	} else {
   104  		if ret.Get(0) != nil {
   105  			r0 = ret.Get(0).(flow.StateCommitment)
   106  		}
   107  	}
   108  
   109  	if rf, ok := ret.Get(1).(func([]flow.RegisterID, [][]byte, flow.StateCommitment) error); ok {
   110  		r1 = rf(registerIDs, values, stateCommitment)
   111  	} else {
   112  		r1 = ret.Error(1)
   113  	}
   114  
   115  	return r0, r1
   116  }
   117  
   118  // UpdateRegistersWithProof provides a mock function with given fields: registerIDs, values, stateCommitment
   119  func (_m *Ledger) UpdateRegistersWithProof(registerIDs []flow.RegisterID, values [][]byte, stateCommitment flow.StateCommitment) (flow.StateCommitment, [][]byte, error) {
   120  	ret := _m.Called(registerIDs, values, stateCommitment)
   121  
   122  	var r0 flow.StateCommitment
   123  	var r1 [][]byte
   124  	var r2 error
   125  	if rf, ok := ret.Get(0).(func([]flow.RegisterID, [][]byte, flow.StateCommitment) (flow.StateCommitment, [][]byte, error)); ok {
   126  		return rf(registerIDs, values, stateCommitment)
   127  	}
   128  	if rf, ok := ret.Get(0).(func([]flow.RegisterID, [][]byte, flow.StateCommitment) flow.StateCommitment); ok {
   129  		r0 = rf(registerIDs, values, stateCommitment)
   130  	} else {
   131  		if ret.Get(0) != nil {
   132  			r0 = ret.Get(0).(flow.StateCommitment)
   133  		}
   134  	}
   135  
   136  	if rf, ok := ret.Get(1).(func([]flow.RegisterID, [][]byte, flow.StateCommitment) [][]byte); ok {
   137  		r1 = rf(registerIDs, values, stateCommitment)
   138  	} else {
   139  		if ret.Get(1) != nil {
   140  			r1 = ret.Get(1).([][]byte)
   141  		}
   142  	}
   143  
   144  	if rf, ok := ret.Get(2).(func([]flow.RegisterID, [][]byte, flow.StateCommitment) error); ok {
   145  		r2 = rf(registerIDs, values, stateCommitment)
   146  	} else {
   147  		r2 = ret.Error(2)
   148  	}
   149  
   150  	return r0, r1, r2
   151  }
   152  
   153  type mockConstructorTestingTNewLedger interface {
   154  	mock.TestingT
   155  	Cleanup(func())
   156  }
   157  
   158  // NewLedger creates a new instance of Ledger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   159  func NewLedger(t mockConstructorTestingTNewLedger) *Ledger {
   160  	mock := &Ledger{}
   161  	mock.Mock.Test(t)
   162  
   163  	t.Cleanup(func() { mock.AssertExpectations(t) })
   164  
   165  	return mock
   166  }