github.com/koko1123/flow-go-1@v0.29.6/storage/mock/collections.go (about)

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