github.com/koko1123/flow-go-1@v0.29.6/module/mempool/mock/back_data.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mempool
     4  
     5  import (
     6  	flow "github.com/koko1123/flow-go-1/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  	if rf, ok := ret.Get(0).(func(flow.Identifier, func(flow.Entity) flow.Entity) flow.Entity); ok {
    36  		r0 = rf(entityID, f)
    37  	} else {
    38  		if ret.Get(0) != nil {
    39  			r0 = ret.Get(0).(flow.Entity)
    40  		}
    41  	}
    42  
    43  	var r1 bool
    44  	if rf, ok := ret.Get(1).(func(flow.Identifier, func(flow.Entity) flow.Entity) bool); ok {
    45  		r1 = rf(entityID, f)
    46  	} else {
    47  		r1 = ret.Get(1).(bool)
    48  	}
    49  
    50  	return r0, r1
    51  }
    52  
    53  // All provides a mock function with given fields:
    54  func (_m *BackData) All() map[flow.Identifier]flow.Entity {
    55  	ret := _m.Called()
    56  
    57  	var r0 map[flow.Identifier]flow.Entity
    58  	if rf, ok := ret.Get(0).(func() map[flow.Identifier]flow.Entity); ok {
    59  		r0 = rf()
    60  	} else {
    61  		if ret.Get(0) != nil {
    62  			r0 = ret.Get(0).(map[flow.Identifier]flow.Entity)
    63  		}
    64  	}
    65  
    66  	return r0
    67  }
    68  
    69  // ByID provides a mock function with given fields: entityID
    70  func (_m *BackData) ByID(entityID flow.Identifier) (flow.Entity, bool) {
    71  	ret := _m.Called(entityID)
    72  
    73  	var r0 flow.Entity
    74  	if rf, ok := ret.Get(0).(func(flow.Identifier) flow.Entity); ok {
    75  		r0 = rf(entityID)
    76  	} else {
    77  		if ret.Get(0) != nil {
    78  			r0 = ret.Get(0).(flow.Entity)
    79  		}
    80  	}
    81  
    82  	var r1 bool
    83  	if rf, ok := ret.Get(1).(func(flow.Identifier) bool); ok {
    84  		r1 = rf(entityID)
    85  	} else {
    86  		r1 = ret.Get(1).(bool)
    87  	}
    88  
    89  	return r0, r1
    90  }
    91  
    92  // Clear provides a mock function with given fields:
    93  func (_m *BackData) Clear() {
    94  	_m.Called()
    95  }
    96  
    97  // Entities provides a mock function with given fields:
    98  func (_m *BackData) Entities() []flow.Entity {
    99  	ret := _m.Called()
   100  
   101  	var r0 []flow.Entity
   102  	if rf, ok := ret.Get(0).(func() []flow.Entity); ok {
   103  		r0 = rf()
   104  	} else {
   105  		if ret.Get(0) != nil {
   106  			r0 = ret.Get(0).([]flow.Entity)
   107  		}
   108  	}
   109  
   110  	return r0
   111  }
   112  
   113  // Has provides a mock function with given fields: entityID
   114  func (_m *BackData) Has(entityID flow.Identifier) bool {
   115  	ret := _m.Called(entityID)
   116  
   117  	var r0 bool
   118  	if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok {
   119  		r0 = rf(entityID)
   120  	} else {
   121  		r0 = ret.Get(0).(bool)
   122  	}
   123  
   124  	return r0
   125  }
   126  
   127  // Identifiers provides a mock function with given fields:
   128  func (_m *BackData) Identifiers() flow.IdentifierList {
   129  	ret := _m.Called()
   130  
   131  	var r0 flow.IdentifierList
   132  	if rf, ok := ret.Get(0).(func() flow.IdentifierList); ok {
   133  		r0 = rf()
   134  	} else {
   135  		if ret.Get(0) != nil {
   136  			r0 = ret.Get(0).(flow.IdentifierList)
   137  		}
   138  	}
   139  
   140  	return r0
   141  }
   142  
   143  // Remove provides a mock function with given fields: entityID
   144  func (_m *BackData) Remove(entityID flow.Identifier) (flow.Entity, bool) {
   145  	ret := _m.Called(entityID)
   146  
   147  	var r0 flow.Entity
   148  	if rf, ok := ret.Get(0).(func(flow.Identifier) flow.Entity); ok {
   149  		r0 = rf(entityID)
   150  	} else {
   151  		if ret.Get(0) != nil {
   152  			r0 = ret.Get(0).(flow.Entity)
   153  		}
   154  	}
   155  
   156  	var r1 bool
   157  	if rf, ok := ret.Get(1).(func(flow.Identifier) bool); ok {
   158  		r1 = rf(entityID)
   159  	} else {
   160  		r1 = ret.Get(1).(bool)
   161  	}
   162  
   163  	return r0, r1
   164  }
   165  
   166  // Size provides a mock function with given fields:
   167  func (_m *BackData) Size() uint {
   168  	ret := _m.Called()
   169  
   170  	var r0 uint
   171  	if rf, ok := ret.Get(0).(func() uint); ok {
   172  		r0 = rf()
   173  	} else {
   174  		r0 = ret.Get(0).(uint)
   175  	}
   176  
   177  	return r0
   178  }
   179  
   180  type mockConstructorTestingTNewBackData interface {
   181  	mock.TestingT
   182  	Cleanup(func())
   183  }
   184  
   185  // 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.
   186  func NewBackData(t mockConstructorTestingTNewBackData) *BackData {
   187  	mock := &BackData{}
   188  	mock.Mock.Test(t)
   189  
   190  	t.Cleanup(func() { mock.AssertExpectations(t) })
   191  
   192  	return mock
   193  }