github.com/lyft/flytestdlib@v0.3.12-0.20210213045714-8cdd111ecda1/random/mocks/weighted_random_list.go (about) 1 // Code generated by mockery v1.0.1. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 rand "math/rand" 7 8 mock "github.com/stretchr/testify/mock" 9 10 random "github.com/lyft/flytestdlib/random" 11 ) 12 13 // WeightedRandomList is an autogenerated mock type for the WeightedRandomList type 14 type WeightedRandomList struct { 15 mock.Mock 16 } 17 18 type WeightedRandomList_Get struct { 19 *mock.Call 20 } 21 22 func (_m WeightedRandomList_Get) Return(_a0 random.Comparable) *WeightedRandomList_Get { 23 return &WeightedRandomList_Get{Call: _m.Call.Return(_a0)} 24 } 25 26 func (_m *WeightedRandomList) OnGet() *WeightedRandomList_Get { 27 c := _m.On("Get") 28 return &WeightedRandomList_Get{Call: c} 29 } 30 31 func (_m *WeightedRandomList) OnGetMatch(matchers ...interface{}) *WeightedRandomList_Get { 32 c := _m.On("Get", matchers...) 33 return &WeightedRandomList_Get{Call: c} 34 } 35 36 // Get provides a mock function with given fields: 37 func (_m *WeightedRandomList) Get() random.Comparable { 38 ret := _m.Called() 39 40 var r0 random.Comparable 41 if rf, ok := ret.Get(0).(func() random.Comparable); ok { 42 r0 = rf() 43 } else { 44 if ret.Get(0) != nil { 45 r0 = ret.Get(0).(random.Comparable) 46 } 47 } 48 49 return r0 50 } 51 52 type WeightedRandomList_GetWithSeed struct { 53 *mock.Call 54 } 55 56 func (_m WeightedRandomList_GetWithSeed) Return(_a0 random.Comparable, _a1 error) *WeightedRandomList_GetWithSeed { 57 return &WeightedRandomList_GetWithSeed{Call: _m.Call.Return(_a0, _a1)} 58 } 59 60 func (_m *WeightedRandomList) OnGetWithSeed(seed rand.Source) *WeightedRandomList_GetWithSeed { 61 c := _m.On("GetWithSeed", seed) 62 return &WeightedRandomList_GetWithSeed{Call: c} 63 } 64 65 func (_m *WeightedRandomList) OnGetWithSeedMatch(matchers ...interface{}) *WeightedRandomList_GetWithSeed { 66 c := _m.On("GetWithSeed", matchers...) 67 return &WeightedRandomList_GetWithSeed{Call: c} 68 } 69 70 // GetWithSeed provides a mock function with given fields: seed 71 func (_m *WeightedRandomList) GetWithSeed(seed rand.Source) (random.Comparable, error) { 72 ret := _m.Called(seed) 73 74 var r0 random.Comparable 75 if rf, ok := ret.Get(0).(func(rand.Source) random.Comparable); ok { 76 r0 = rf(seed) 77 } else { 78 if ret.Get(0) != nil { 79 r0 = ret.Get(0).(random.Comparable) 80 } 81 } 82 83 var r1 error 84 if rf, ok := ret.Get(1).(func(rand.Source) error); ok { 85 r1 = rf(seed) 86 } else { 87 r1 = ret.Error(1) 88 } 89 90 return r0, r1 91 } 92 93 type WeightedRandomList_Len struct { 94 *mock.Call 95 } 96 97 func (_m WeightedRandomList_Len) Return(_a0 int) *WeightedRandomList_Len { 98 return &WeightedRandomList_Len{Call: _m.Call.Return(_a0)} 99 } 100 101 func (_m *WeightedRandomList) OnLen() *WeightedRandomList_Len { 102 c := _m.On("Len") 103 return &WeightedRandomList_Len{Call: c} 104 } 105 106 func (_m *WeightedRandomList) OnLenMatch(matchers ...interface{}) *WeightedRandomList_Len { 107 c := _m.On("Len", matchers...) 108 return &WeightedRandomList_Len{Call: c} 109 } 110 111 // Len provides a mock function with given fields: 112 func (_m *WeightedRandomList) Len() int { 113 ret := _m.Called() 114 115 var r0 int 116 if rf, ok := ret.Get(0).(func() int); ok { 117 r0 = rf() 118 } else { 119 r0 = ret.Get(0).(int) 120 } 121 122 return r0 123 } 124 125 type WeightedRandomList_List struct { 126 *mock.Call 127 } 128 129 func (_m WeightedRandomList_List) Return(_a0 []random.Comparable) *WeightedRandomList_List { 130 return &WeightedRandomList_List{Call: _m.Call.Return(_a0)} 131 } 132 133 func (_m *WeightedRandomList) OnList() *WeightedRandomList_List { 134 c := _m.On("List") 135 return &WeightedRandomList_List{Call: c} 136 } 137 138 func (_m *WeightedRandomList) OnListMatch(matchers ...interface{}) *WeightedRandomList_List { 139 c := _m.On("List", matchers...) 140 return &WeightedRandomList_List{Call: c} 141 } 142 143 // List provides a mock function with given fields: 144 func (_m *WeightedRandomList) List() []random.Comparable { 145 ret := _m.Called() 146 147 var r0 []random.Comparable 148 if rf, ok := ret.Get(0).(func() []random.Comparable); ok { 149 r0 = rf() 150 } else { 151 if ret.Get(0) != nil { 152 r0 = ret.Get(0).([]random.Comparable) 153 } 154 } 155 156 return r0 157 }