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

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