github.com/jghiloni/cli@v6.28.1-0.20170628223758-0ce05fe032a2+incompatible/actor/v2action/v2actionfakes/fake_config.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v2actionfakes 3 4 import ( 5 "sync" 6 "time" 7 8 "code.cloudfoundry.org/cli/actor/v2action" 9 ) 10 11 type FakeConfig struct { 12 PollingIntervalStub func() time.Duration 13 pollingIntervalMutex sync.RWMutex 14 pollingIntervalArgsForCall []struct{} 15 pollingIntervalReturns struct { 16 result1 time.Duration 17 } 18 pollingIntervalReturnsOnCall map[int]struct { 19 result1 time.Duration 20 } 21 SetTargetInformationStub func(api string, apiVersion string, auth string, minCLIVersion string, doppler string, uaa string, routing string, skipSSLValidation bool) 22 setTargetInformationMutex sync.RWMutex 23 setTargetInformationArgsForCall []struct { 24 api string 25 apiVersion string 26 auth string 27 minCLIVersion string 28 doppler string 29 uaa string 30 routing string 31 skipSSLValidation bool 32 } 33 SetTokenInformationStub func(accessToken string, refreshToken string, sshOAuthClient string) 34 setTokenInformationMutex sync.RWMutex 35 setTokenInformationArgsForCall []struct { 36 accessToken string 37 refreshToken string 38 sshOAuthClient string 39 } 40 SkipSSLValidationStub func() bool 41 skipSSLValidationMutex sync.RWMutex 42 skipSSLValidationArgsForCall []struct{} 43 skipSSLValidationReturns struct { 44 result1 bool 45 } 46 skipSSLValidationReturnsOnCall map[int]struct { 47 result1 bool 48 } 49 StagingTimeoutStub func() time.Duration 50 stagingTimeoutMutex sync.RWMutex 51 stagingTimeoutArgsForCall []struct{} 52 stagingTimeoutReturns struct { 53 result1 time.Duration 54 } 55 stagingTimeoutReturnsOnCall map[int]struct { 56 result1 time.Duration 57 } 58 StartupTimeoutStub func() time.Duration 59 startupTimeoutMutex sync.RWMutex 60 startupTimeoutArgsForCall []struct{} 61 startupTimeoutReturns struct { 62 result1 time.Duration 63 } 64 startupTimeoutReturnsOnCall map[int]struct { 65 result1 time.Duration 66 } 67 TargetStub func() string 68 targetMutex sync.RWMutex 69 targetArgsForCall []struct{} 70 targetReturns struct { 71 result1 string 72 } 73 targetReturnsOnCall map[int]struct { 74 result1 string 75 } 76 UnsetOrganizationInformationStub func() 77 unsetOrganizationInformationMutex sync.RWMutex 78 unsetOrganizationInformationArgsForCall []struct{} 79 UnsetSpaceInformationStub func() 80 unsetSpaceInformationMutex sync.RWMutex 81 unsetSpaceInformationArgsForCall []struct{} 82 invocations map[string][][]interface{} 83 invocationsMutex sync.RWMutex 84 } 85 86 func (fake *FakeConfig) PollingInterval() time.Duration { 87 fake.pollingIntervalMutex.Lock() 88 ret, specificReturn := fake.pollingIntervalReturnsOnCall[len(fake.pollingIntervalArgsForCall)] 89 fake.pollingIntervalArgsForCall = append(fake.pollingIntervalArgsForCall, struct{}{}) 90 fake.recordInvocation("PollingInterval", []interface{}{}) 91 fake.pollingIntervalMutex.Unlock() 92 if fake.PollingIntervalStub != nil { 93 return fake.PollingIntervalStub() 94 } 95 if specificReturn { 96 return ret.result1 97 } 98 return fake.pollingIntervalReturns.result1 99 } 100 101 func (fake *FakeConfig) PollingIntervalCallCount() int { 102 fake.pollingIntervalMutex.RLock() 103 defer fake.pollingIntervalMutex.RUnlock() 104 return len(fake.pollingIntervalArgsForCall) 105 } 106 107 func (fake *FakeConfig) PollingIntervalReturns(result1 time.Duration) { 108 fake.PollingIntervalStub = nil 109 fake.pollingIntervalReturns = struct { 110 result1 time.Duration 111 }{result1} 112 } 113 114 func (fake *FakeConfig) PollingIntervalReturnsOnCall(i int, result1 time.Duration) { 115 fake.PollingIntervalStub = nil 116 if fake.pollingIntervalReturnsOnCall == nil { 117 fake.pollingIntervalReturnsOnCall = make(map[int]struct { 118 result1 time.Duration 119 }) 120 } 121 fake.pollingIntervalReturnsOnCall[i] = struct { 122 result1 time.Duration 123 }{result1} 124 } 125 126 func (fake *FakeConfig) SetTargetInformation(api string, apiVersion string, auth string, minCLIVersion string, doppler string, uaa string, routing string, skipSSLValidation bool) { 127 fake.setTargetInformationMutex.Lock() 128 fake.setTargetInformationArgsForCall = append(fake.setTargetInformationArgsForCall, struct { 129 api string 130 apiVersion string 131 auth string 132 minCLIVersion string 133 doppler string 134 uaa string 135 routing string 136 skipSSLValidation bool 137 }{api, apiVersion, auth, minCLIVersion, doppler, uaa, routing, skipSSLValidation}) 138 fake.recordInvocation("SetTargetInformation", []interface{}{api, apiVersion, auth, minCLIVersion, doppler, uaa, routing, skipSSLValidation}) 139 fake.setTargetInformationMutex.Unlock() 140 if fake.SetTargetInformationStub != nil { 141 fake.SetTargetInformationStub(api, apiVersion, auth, minCLIVersion, doppler, uaa, routing, skipSSLValidation) 142 } 143 } 144 145 func (fake *FakeConfig) SetTargetInformationCallCount() int { 146 fake.setTargetInformationMutex.RLock() 147 defer fake.setTargetInformationMutex.RUnlock() 148 return len(fake.setTargetInformationArgsForCall) 149 } 150 151 func (fake *FakeConfig) SetTargetInformationArgsForCall(i int) (string, string, string, string, string, string, string, bool) { 152 fake.setTargetInformationMutex.RLock() 153 defer fake.setTargetInformationMutex.RUnlock() 154 return fake.setTargetInformationArgsForCall[i].api, fake.setTargetInformationArgsForCall[i].apiVersion, fake.setTargetInformationArgsForCall[i].auth, fake.setTargetInformationArgsForCall[i].minCLIVersion, fake.setTargetInformationArgsForCall[i].doppler, fake.setTargetInformationArgsForCall[i].uaa, fake.setTargetInformationArgsForCall[i].routing, fake.setTargetInformationArgsForCall[i].skipSSLValidation 155 } 156 157 func (fake *FakeConfig) SetTokenInformation(accessToken string, refreshToken string, sshOAuthClient string) { 158 fake.setTokenInformationMutex.Lock() 159 fake.setTokenInformationArgsForCall = append(fake.setTokenInformationArgsForCall, struct { 160 accessToken string 161 refreshToken string 162 sshOAuthClient string 163 }{accessToken, refreshToken, sshOAuthClient}) 164 fake.recordInvocation("SetTokenInformation", []interface{}{accessToken, refreshToken, sshOAuthClient}) 165 fake.setTokenInformationMutex.Unlock() 166 if fake.SetTokenInformationStub != nil { 167 fake.SetTokenInformationStub(accessToken, refreshToken, sshOAuthClient) 168 } 169 } 170 171 func (fake *FakeConfig) SetTokenInformationCallCount() int { 172 fake.setTokenInformationMutex.RLock() 173 defer fake.setTokenInformationMutex.RUnlock() 174 return len(fake.setTokenInformationArgsForCall) 175 } 176 177 func (fake *FakeConfig) SetTokenInformationArgsForCall(i int) (string, string, string) { 178 fake.setTokenInformationMutex.RLock() 179 defer fake.setTokenInformationMutex.RUnlock() 180 return fake.setTokenInformationArgsForCall[i].accessToken, fake.setTokenInformationArgsForCall[i].refreshToken, fake.setTokenInformationArgsForCall[i].sshOAuthClient 181 } 182 183 func (fake *FakeConfig) SkipSSLValidation() bool { 184 fake.skipSSLValidationMutex.Lock() 185 ret, specificReturn := fake.skipSSLValidationReturnsOnCall[len(fake.skipSSLValidationArgsForCall)] 186 fake.skipSSLValidationArgsForCall = append(fake.skipSSLValidationArgsForCall, struct{}{}) 187 fake.recordInvocation("SkipSSLValidation", []interface{}{}) 188 fake.skipSSLValidationMutex.Unlock() 189 if fake.SkipSSLValidationStub != nil { 190 return fake.SkipSSLValidationStub() 191 } 192 if specificReturn { 193 return ret.result1 194 } 195 return fake.skipSSLValidationReturns.result1 196 } 197 198 func (fake *FakeConfig) SkipSSLValidationCallCount() int { 199 fake.skipSSLValidationMutex.RLock() 200 defer fake.skipSSLValidationMutex.RUnlock() 201 return len(fake.skipSSLValidationArgsForCall) 202 } 203 204 func (fake *FakeConfig) SkipSSLValidationReturns(result1 bool) { 205 fake.SkipSSLValidationStub = nil 206 fake.skipSSLValidationReturns = struct { 207 result1 bool 208 }{result1} 209 } 210 211 func (fake *FakeConfig) SkipSSLValidationReturnsOnCall(i int, result1 bool) { 212 fake.SkipSSLValidationStub = nil 213 if fake.skipSSLValidationReturnsOnCall == nil { 214 fake.skipSSLValidationReturnsOnCall = make(map[int]struct { 215 result1 bool 216 }) 217 } 218 fake.skipSSLValidationReturnsOnCall[i] = struct { 219 result1 bool 220 }{result1} 221 } 222 223 func (fake *FakeConfig) StagingTimeout() time.Duration { 224 fake.stagingTimeoutMutex.Lock() 225 ret, specificReturn := fake.stagingTimeoutReturnsOnCall[len(fake.stagingTimeoutArgsForCall)] 226 fake.stagingTimeoutArgsForCall = append(fake.stagingTimeoutArgsForCall, struct{}{}) 227 fake.recordInvocation("StagingTimeout", []interface{}{}) 228 fake.stagingTimeoutMutex.Unlock() 229 if fake.StagingTimeoutStub != nil { 230 return fake.StagingTimeoutStub() 231 } 232 if specificReturn { 233 return ret.result1 234 } 235 return fake.stagingTimeoutReturns.result1 236 } 237 238 func (fake *FakeConfig) StagingTimeoutCallCount() int { 239 fake.stagingTimeoutMutex.RLock() 240 defer fake.stagingTimeoutMutex.RUnlock() 241 return len(fake.stagingTimeoutArgsForCall) 242 } 243 244 func (fake *FakeConfig) StagingTimeoutReturns(result1 time.Duration) { 245 fake.StagingTimeoutStub = nil 246 fake.stagingTimeoutReturns = struct { 247 result1 time.Duration 248 }{result1} 249 } 250 251 func (fake *FakeConfig) StagingTimeoutReturnsOnCall(i int, result1 time.Duration) { 252 fake.StagingTimeoutStub = nil 253 if fake.stagingTimeoutReturnsOnCall == nil { 254 fake.stagingTimeoutReturnsOnCall = make(map[int]struct { 255 result1 time.Duration 256 }) 257 } 258 fake.stagingTimeoutReturnsOnCall[i] = struct { 259 result1 time.Duration 260 }{result1} 261 } 262 263 func (fake *FakeConfig) StartupTimeout() time.Duration { 264 fake.startupTimeoutMutex.Lock() 265 ret, specificReturn := fake.startupTimeoutReturnsOnCall[len(fake.startupTimeoutArgsForCall)] 266 fake.startupTimeoutArgsForCall = append(fake.startupTimeoutArgsForCall, struct{}{}) 267 fake.recordInvocation("StartupTimeout", []interface{}{}) 268 fake.startupTimeoutMutex.Unlock() 269 if fake.StartupTimeoutStub != nil { 270 return fake.StartupTimeoutStub() 271 } 272 if specificReturn { 273 return ret.result1 274 } 275 return fake.startupTimeoutReturns.result1 276 } 277 278 func (fake *FakeConfig) StartupTimeoutCallCount() int { 279 fake.startupTimeoutMutex.RLock() 280 defer fake.startupTimeoutMutex.RUnlock() 281 return len(fake.startupTimeoutArgsForCall) 282 } 283 284 func (fake *FakeConfig) StartupTimeoutReturns(result1 time.Duration) { 285 fake.StartupTimeoutStub = nil 286 fake.startupTimeoutReturns = struct { 287 result1 time.Duration 288 }{result1} 289 } 290 291 func (fake *FakeConfig) StartupTimeoutReturnsOnCall(i int, result1 time.Duration) { 292 fake.StartupTimeoutStub = nil 293 if fake.startupTimeoutReturnsOnCall == nil { 294 fake.startupTimeoutReturnsOnCall = make(map[int]struct { 295 result1 time.Duration 296 }) 297 } 298 fake.startupTimeoutReturnsOnCall[i] = struct { 299 result1 time.Duration 300 }{result1} 301 } 302 303 func (fake *FakeConfig) Target() string { 304 fake.targetMutex.Lock() 305 ret, specificReturn := fake.targetReturnsOnCall[len(fake.targetArgsForCall)] 306 fake.targetArgsForCall = append(fake.targetArgsForCall, struct{}{}) 307 fake.recordInvocation("Target", []interface{}{}) 308 fake.targetMutex.Unlock() 309 if fake.TargetStub != nil { 310 return fake.TargetStub() 311 } 312 if specificReturn { 313 return ret.result1 314 } 315 return fake.targetReturns.result1 316 } 317 318 func (fake *FakeConfig) TargetCallCount() int { 319 fake.targetMutex.RLock() 320 defer fake.targetMutex.RUnlock() 321 return len(fake.targetArgsForCall) 322 } 323 324 func (fake *FakeConfig) TargetReturns(result1 string) { 325 fake.TargetStub = nil 326 fake.targetReturns = struct { 327 result1 string 328 }{result1} 329 } 330 331 func (fake *FakeConfig) TargetReturnsOnCall(i int, result1 string) { 332 fake.TargetStub = nil 333 if fake.targetReturnsOnCall == nil { 334 fake.targetReturnsOnCall = make(map[int]struct { 335 result1 string 336 }) 337 } 338 fake.targetReturnsOnCall[i] = struct { 339 result1 string 340 }{result1} 341 } 342 343 func (fake *FakeConfig) UnsetOrganizationInformation() { 344 fake.unsetOrganizationInformationMutex.Lock() 345 fake.unsetOrganizationInformationArgsForCall = append(fake.unsetOrganizationInformationArgsForCall, struct{}{}) 346 fake.recordInvocation("UnsetOrganizationInformation", []interface{}{}) 347 fake.unsetOrganizationInformationMutex.Unlock() 348 if fake.UnsetOrganizationInformationStub != nil { 349 fake.UnsetOrganizationInformationStub() 350 } 351 } 352 353 func (fake *FakeConfig) UnsetOrganizationInformationCallCount() int { 354 fake.unsetOrganizationInformationMutex.RLock() 355 defer fake.unsetOrganizationInformationMutex.RUnlock() 356 return len(fake.unsetOrganizationInformationArgsForCall) 357 } 358 359 func (fake *FakeConfig) UnsetSpaceInformation() { 360 fake.unsetSpaceInformationMutex.Lock() 361 fake.unsetSpaceInformationArgsForCall = append(fake.unsetSpaceInformationArgsForCall, struct{}{}) 362 fake.recordInvocation("UnsetSpaceInformation", []interface{}{}) 363 fake.unsetSpaceInformationMutex.Unlock() 364 if fake.UnsetSpaceInformationStub != nil { 365 fake.UnsetSpaceInformationStub() 366 } 367 } 368 369 func (fake *FakeConfig) UnsetSpaceInformationCallCount() int { 370 fake.unsetSpaceInformationMutex.RLock() 371 defer fake.unsetSpaceInformationMutex.RUnlock() 372 return len(fake.unsetSpaceInformationArgsForCall) 373 } 374 375 func (fake *FakeConfig) Invocations() map[string][][]interface{} { 376 fake.invocationsMutex.RLock() 377 defer fake.invocationsMutex.RUnlock() 378 fake.pollingIntervalMutex.RLock() 379 defer fake.pollingIntervalMutex.RUnlock() 380 fake.setTargetInformationMutex.RLock() 381 defer fake.setTargetInformationMutex.RUnlock() 382 fake.setTokenInformationMutex.RLock() 383 defer fake.setTokenInformationMutex.RUnlock() 384 fake.skipSSLValidationMutex.RLock() 385 defer fake.skipSSLValidationMutex.RUnlock() 386 fake.stagingTimeoutMutex.RLock() 387 defer fake.stagingTimeoutMutex.RUnlock() 388 fake.startupTimeoutMutex.RLock() 389 defer fake.startupTimeoutMutex.RUnlock() 390 fake.targetMutex.RLock() 391 defer fake.targetMutex.RUnlock() 392 fake.unsetOrganizationInformationMutex.RLock() 393 defer fake.unsetOrganizationInformationMutex.RUnlock() 394 fake.unsetSpaceInformationMutex.RLock() 395 defer fake.unsetSpaceInformationMutex.RUnlock() 396 copiedInvocations := map[string][][]interface{}{} 397 for key, value := range fake.invocations { 398 copiedInvocations[key] = value 399 } 400 return copiedInvocations 401 } 402 403 func (fake *FakeConfig) recordInvocation(key string, args []interface{}) { 404 fake.invocationsMutex.Lock() 405 defer fake.invocationsMutex.Unlock() 406 if fake.invocations == nil { 407 fake.invocations = map[string][][]interface{}{} 408 } 409 if fake.invocations[key] == nil { 410 fake.invocations[key] = [][]interface{}{} 411 } 412 fake.invocations[key] = append(fake.invocations[key], args) 413 } 414 415 var _ v2action.Config = new(FakeConfig)