github.com/cloudfoundry/cli@v7.1.0+incompatible/util/ui/uifakes/fake_log_message.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package uifakes 3 4 import ( 5 "sync" 6 "time" 7 8 "code.cloudfoundry.org/cli/util/ui" 9 ) 10 11 type FakeLogMessage struct { 12 MessageStub func() string 13 messageMutex sync.RWMutex 14 messageArgsForCall []struct { 15 } 16 messageReturns struct { 17 result1 string 18 } 19 messageReturnsOnCall map[int]struct { 20 result1 string 21 } 22 SourceInstanceStub func() string 23 sourceInstanceMutex sync.RWMutex 24 sourceInstanceArgsForCall []struct { 25 } 26 sourceInstanceReturns struct { 27 result1 string 28 } 29 sourceInstanceReturnsOnCall map[int]struct { 30 result1 string 31 } 32 SourceTypeStub func() string 33 sourceTypeMutex sync.RWMutex 34 sourceTypeArgsForCall []struct { 35 } 36 sourceTypeReturns struct { 37 result1 string 38 } 39 sourceTypeReturnsOnCall map[int]struct { 40 result1 string 41 } 42 TimestampStub func() time.Time 43 timestampMutex sync.RWMutex 44 timestampArgsForCall []struct { 45 } 46 timestampReturns struct { 47 result1 time.Time 48 } 49 timestampReturnsOnCall map[int]struct { 50 result1 time.Time 51 } 52 TypeStub func() string 53 typeMutex sync.RWMutex 54 typeArgsForCall []struct { 55 } 56 typeReturns struct { 57 result1 string 58 } 59 typeReturnsOnCall map[int]struct { 60 result1 string 61 } 62 invocations map[string][][]interface{} 63 invocationsMutex sync.RWMutex 64 } 65 66 func (fake *FakeLogMessage) Message() string { 67 fake.messageMutex.Lock() 68 ret, specificReturn := fake.messageReturnsOnCall[len(fake.messageArgsForCall)] 69 fake.messageArgsForCall = append(fake.messageArgsForCall, struct { 70 }{}) 71 fake.recordInvocation("Message", []interface{}{}) 72 fake.messageMutex.Unlock() 73 if fake.MessageStub != nil { 74 return fake.MessageStub() 75 } 76 if specificReturn { 77 return ret.result1 78 } 79 fakeReturns := fake.messageReturns 80 return fakeReturns.result1 81 } 82 83 func (fake *FakeLogMessage) MessageCallCount() int { 84 fake.messageMutex.RLock() 85 defer fake.messageMutex.RUnlock() 86 return len(fake.messageArgsForCall) 87 } 88 89 func (fake *FakeLogMessage) MessageCalls(stub func() string) { 90 fake.messageMutex.Lock() 91 defer fake.messageMutex.Unlock() 92 fake.MessageStub = stub 93 } 94 95 func (fake *FakeLogMessage) MessageReturns(result1 string) { 96 fake.messageMutex.Lock() 97 defer fake.messageMutex.Unlock() 98 fake.MessageStub = nil 99 fake.messageReturns = struct { 100 result1 string 101 }{result1} 102 } 103 104 func (fake *FakeLogMessage) MessageReturnsOnCall(i int, result1 string) { 105 fake.messageMutex.Lock() 106 defer fake.messageMutex.Unlock() 107 fake.MessageStub = nil 108 if fake.messageReturnsOnCall == nil { 109 fake.messageReturnsOnCall = make(map[int]struct { 110 result1 string 111 }) 112 } 113 fake.messageReturnsOnCall[i] = struct { 114 result1 string 115 }{result1} 116 } 117 118 func (fake *FakeLogMessage) SourceInstance() string { 119 fake.sourceInstanceMutex.Lock() 120 ret, specificReturn := fake.sourceInstanceReturnsOnCall[len(fake.sourceInstanceArgsForCall)] 121 fake.sourceInstanceArgsForCall = append(fake.sourceInstanceArgsForCall, struct { 122 }{}) 123 fake.recordInvocation("SourceInstance", []interface{}{}) 124 fake.sourceInstanceMutex.Unlock() 125 if fake.SourceInstanceStub != nil { 126 return fake.SourceInstanceStub() 127 } 128 if specificReturn { 129 return ret.result1 130 } 131 fakeReturns := fake.sourceInstanceReturns 132 return fakeReturns.result1 133 } 134 135 func (fake *FakeLogMessage) SourceInstanceCallCount() int { 136 fake.sourceInstanceMutex.RLock() 137 defer fake.sourceInstanceMutex.RUnlock() 138 return len(fake.sourceInstanceArgsForCall) 139 } 140 141 func (fake *FakeLogMessage) SourceInstanceCalls(stub func() string) { 142 fake.sourceInstanceMutex.Lock() 143 defer fake.sourceInstanceMutex.Unlock() 144 fake.SourceInstanceStub = stub 145 } 146 147 func (fake *FakeLogMessage) SourceInstanceReturns(result1 string) { 148 fake.sourceInstanceMutex.Lock() 149 defer fake.sourceInstanceMutex.Unlock() 150 fake.SourceInstanceStub = nil 151 fake.sourceInstanceReturns = struct { 152 result1 string 153 }{result1} 154 } 155 156 func (fake *FakeLogMessage) SourceInstanceReturnsOnCall(i int, result1 string) { 157 fake.sourceInstanceMutex.Lock() 158 defer fake.sourceInstanceMutex.Unlock() 159 fake.SourceInstanceStub = nil 160 if fake.sourceInstanceReturnsOnCall == nil { 161 fake.sourceInstanceReturnsOnCall = make(map[int]struct { 162 result1 string 163 }) 164 } 165 fake.sourceInstanceReturnsOnCall[i] = struct { 166 result1 string 167 }{result1} 168 } 169 170 func (fake *FakeLogMessage) SourceType() string { 171 fake.sourceTypeMutex.Lock() 172 ret, specificReturn := fake.sourceTypeReturnsOnCall[len(fake.sourceTypeArgsForCall)] 173 fake.sourceTypeArgsForCall = append(fake.sourceTypeArgsForCall, struct { 174 }{}) 175 fake.recordInvocation("SourceType", []interface{}{}) 176 fake.sourceTypeMutex.Unlock() 177 if fake.SourceTypeStub != nil { 178 return fake.SourceTypeStub() 179 } 180 if specificReturn { 181 return ret.result1 182 } 183 fakeReturns := fake.sourceTypeReturns 184 return fakeReturns.result1 185 } 186 187 func (fake *FakeLogMessage) SourceTypeCallCount() int { 188 fake.sourceTypeMutex.RLock() 189 defer fake.sourceTypeMutex.RUnlock() 190 return len(fake.sourceTypeArgsForCall) 191 } 192 193 func (fake *FakeLogMessage) SourceTypeCalls(stub func() string) { 194 fake.sourceTypeMutex.Lock() 195 defer fake.sourceTypeMutex.Unlock() 196 fake.SourceTypeStub = stub 197 } 198 199 func (fake *FakeLogMessage) SourceTypeReturns(result1 string) { 200 fake.sourceTypeMutex.Lock() 201 defer fake.sourceTypeMutex.Unlock() 202 fake.SourceTypeStub = nil 203 fake.sourceTypeReturns = struct { 204 result1 string 205 }{result1} 206 } 207 208 func (fake *FakeLogMessage) SourceTypeReturnsOnCall(i int, result1 string) { 209 fake.sourceTypeMutex.Lock() 210 defer fake.sourceTypeMutex.Unlock() 211 fake.SourceTypeStub = nil 212 if fake.sourceTypeReturnsOnCall == nil { 213 fake.sourceTypeReturnsOnCall = make(map[int]struct { 214 result1 string 215 }) 216 } 217 fake.sourceTypeReturnsOnCall[i] = struct { 218 result1 string 219 }{result1} 220 } 221 222 func (fake *FakeLogMessage) Timestamp() time.Time { 223 fake.timestampMutex.Lock() 224 ret, specificReturn := fake.timestampReturnsOnCall[len(fake.timestampArgsForCall)] 225 fake.timestampArgsForCall = append(fake.timestampArgsForCall, struct { 226 }{}) 227 fake.recordInvocation("Timestamp", []interface{}{}) 228 fake.timestampMutex.Unlock() 229 if fake.TimestampStub != nil { 230 return fake.TimestampStub() 231 } 232 if specificReturn { 233 return ret.result1 234 } 235 fakeReturns := fake.timestampReturns 236 return fakeReturns.result1 237 } 238 239 func (fake *FakeLogMessage) TimestampCallCount() int { 240 fake.timestampMutex.RLock() 241 defer fake.timestampMutex.RUnlock() 242 return len(fake.timestampArgsForCall) 243 } 244 245 func (fake *FakeLogMessage) TimestampCalls(stub func() time.Time) { 246 fake.timestampMutex.Lock() 247 defer fake.timestampMutex.Unlock() 248 fake.TimestampStub = stub 249 } 250 251 func (fake *FakeLogMessage) TimestampReturns(result1 time.Time) { 252 fake.timestampMutex.Lock() 253 defer fake.timestampMutex.Unlock() 254 fake.TimestampStub = nil 255 fake.timestampReturns = struct { 256 result1 time.Time 257 }{result1} 258 } 259 260 func (fake *FakeLogMessage) TimestampReturnsOnCall(i int, result1 time.Time) { 261 fake.timestampMutex.Lock() 262 defer fake.timestampMutex.Unlock() 263 fake.TimestampStub = nil 264 if fake.timestampReturnsOnCall == nil { 265 fake.timestampReturnsOnCall = make(map[int]struct { 266 result1 time.Time 267 }) 268 } 269 fake.timestampReturnsOnCall[i] = struct { 270 result1 time.Time 271 }{result1} 272 } 273 274 func (fake *FakeLogMessage) Type() string { 275 fake.typeMutex.Lock() 276 ret, specificReturn := fake.typeReturnsOnCall[len(fake.typeArgsForCall)] 277 fake.typeArgsForCall = append(fake.typeArgsForCall, struct { 278 }{}) 279 fake.recordInvocation("Type", []interface{}{}) 280 fake.typeMutex.Unlock() 281 if fake.TypeStub != nil { 282 return fake.TypeStub() 283 } 284 if specificReturn { 285 return ret.result1 286 } 287 fakeReturns := fake.typeReturns 288 return fakeReturns.result1 289 } 290 291 func (fake *FakeLogMessage) TypeCallCount() int { 292 fake.typeMutex.RLock() 293 defer fake.typeMutex.RUnlock() 294 return len(fake.typeArgsForCall) 295 } 296 297 func (fake *FakeLogMessage) TypeCalls(stub func() string) { 298 fake.typeMutex.Lock() 299 defer fake.typeMutex.Unlock() 300 fake.TypeStub = stub 301 } 302 303 func (fake *FakeLogMessage) TypeReturns(result1 string) { 304 fake.typeMutex.Lock() 305 defer fake.typeMutex.Unlock() 306 fake.TypeStub = nil 307 fake.typeReturns = struct { 308 result1 string 309 }{result1} 310 } 311 312 func (fake *FakeLogMessage) TypeReturnsOnCall(i int, result1 string) { 313 fake.typeMutex.Lock() 314 defer fake.typeMutex.Unlock() 315 fake.TypeStub = nil 316 if fake.typeReturnsOnCall == nil { 317 fake.typeReturnsOnCall = make(map[int]struct { 318 result1 string 319 }) 320 } 321 fake.typeReturnsOnCall[i] = struct { 322 result1 string 323 }{result1} 324 } 325 326 func (fake *FakeLogMessage) Invocations() map[string][][]interface{} { 327 fake.invocationsMutex.RLock() 328 defer fake.invocationsMutex.RUnlock() 329 fake.messageMutex.RLock() 330 defer fake.messageMutex.RUnlock() 331 fake.sourceInstanceMutex.RLock() 332 defer fake.sourceInstanceMutex.RUnlock() 333 fake.sourceTypeMutex.RLock() 334 defer fake.sourceTypeMutex.RUnlock() 335 fake.timestampMutex.RLock() 336 defer fake.timestampMutex.RUnlock() 337 fake.typeMutex.RLock() 338 defer fake.typeMutex.RUnlock() 339 copiedInvocations := map[string][][]interface{}{} 340 for key, value := range fake.invocations { 341 copiedInvocations[key] = value 342 } 343 return copiedInvocations 344 } 345 346 func (fake *FakeLogMessage) recordInvocation(key string, args []interface{}) { 347 fake.invocationsMutex.Lock() 348 defer fake.invocationsMutex.Unlock() 349 if fake.invocations == nil { 350 fake.invocations = map[string][][]interface{}{} 351 } 352 if fake.invocations[key] == nil { 353 fake.invocations[key] = [][]interface{}{} 354 } 355 fake.invocations[key] = append(fake.invocations[key], args) 356 } 357 358 var _ ui.LogMessage = new(FakeLogMessage)