github.com/dcarley/cf-cli@v6.24.1-0.20170220111324-4225ff346898+incompatible/command/commandfakes/fake_config.go (about) 1 // This file was generated by counterfeiter 2 package commandfakes 3 4 import ( 5 "sync" 6 "time" 7 8 "code.cloudfoundry.org/cli/command" 9 "code.cloudfoundry.org/cli/util/configv3" 10 ) 11 12 type FakeConfig struct { 13 APIVersionStub func() string 14 aPIVersionMutex sync.RWMutex 15 aPIVersionArgsForCall []struct{} 16 aPIVersionReturns struct { 17 result1 string 18 } 19 AccessTokenStub func() string 20 accessTokenMutex sync.RWMutex 21 accessTokenArgsForCall []struct{} 22 accessTokenReturns struct { 23 result1 string 24 } 25 BinaryNameStub func() string 26 binaryNameMutex sync.RWMutex 27 binaryNameArgsForCall []struct{} 28 binaryNameReturns struct { 29 result1 string 30 } 31 BinaryVersionStub func() string 32 binaryVersionMutex sync.RWMutex 33 binaryVersionArgsForCall []struct{} 34 binaryVersionReturns struct { 35 result1 string 36 } 37 ColorEnabledStub func() configv3.ColorSetting 38 colorEnabledMutex sync.RWMutex 39 colorEnabledArgsForCall []struct{} 40 colorEnabledReturns struct { 41 result1 configv3.ColorSetting 42 } 43 CurrentUserStub func() (configv3.User, error) 44 currentUserMutex sync.RWMutex 45 currentUserArgsForCall []struct{} 46 currentUserReturns struct { 47 result1 configv3.User 48 result2 error 49 } 50 DialTimeoutStub func() time.Duration 51 dialTimeoutMutex sync.RWMutex 52 dialTimeoutArgsForCall []struct{} 53 dialTimeoutReturns struct { 54 result1 time.Duration 55 } 56 ExperimentalStub func() bool 57 experimentalMutex sync.RWMutex 58 experimentalArgsForCall []struct{} 59 experimentalReturns struct { 60 result1 bool 61 } 62 HasTargetedOrganizationStub func() bool 63 hasTargetedOrganizationMutex sync.RWMutex 64 hasTargetedOrganizationArgsForCall []struct{} 65 hasTargetedOrganizationReturns struct { 66 result1 bool 67 } 68 HasTargetedSpaceStub func() bool 69 hasTargetedSpaceMutex sync.RWMutex 70 hasTargetedSpaceArgsForCall []struct{} 71 hasTargetedSpaceReturns struct { 72 result1 bool 73 } 74 LocaleStub func() string 75 localeMutex sync.RWMutex 76 localeArgsForCall []struct{} 77 localeReturns struct { 78 result1 string 79 } 80 MinCLIVersionStub func() string 81 minCLIVersionMutex sync.RWMutex 82 minCLIVersionArgsForCall []struct{} 83 minCLIVersionReturns struct { 84 result1 string 85 } 86 OverallPollingTimeoutStub func() time.Duration 87 overallPollingTimeoutMutex sync.RWMutex 88 overallPollingTimeoutArgsForCall []struct{} 89 overallPollingTimeoutReturns struct { 90 result1 time.Duration 91 } 92 PluginsStub func() map[string]configv3.Plugin 93 pluginsMutex sync.RWMutex 94 pluginsArgsForCall []struct{} 95 pluginsReturns struct { 96 result1 map[string]configv3.Plugin 97 } 98 PollingIntervalStub func() time.Duration 99 pollingIntervalMutex sync.RWMutex 100 pollingIntervalArgsForCall []struct{} 101 pollingIntervalReturns struct { 102 result1 time.Duration 103 } 104 RefreshTokenStub func() string 105 refreshTokenMutex sync.RWMutex 106 refreshTokenArgsForCall []struct{} 107 refreshTokenReturns struct { 108 result1 string 109 } 110 SetAccessTokenStub func(token string) 111 setAccessTokenMutex sync.RWMutex 112 setAccessTokenArgsForCall []struct { 113 token string 114 } 115 SetOrganizationInformationStub func(guid string, name string) 116 setOrganizationInformationMutex sync.RWMutex 117 setOrganizationInformationArgsForCall []struct { 118 guid string 119 name string 120 } 121 SetRefreshTokenStub func(token string) 122 setRefreshTokenMutex sync.RWMutex 123 setRefreshTokenArgsForCall []struct { 124 token string 125 } 126 SetSpaceInformationStub func(guid string, name string, allowSSH bool) 127 setSpaceInformationMutex sync.RWMutex 128 setSpaceInformationArgsForCall []struct { 129 guid string 130 name string 131 allowSSH bool 132 } 133 SetTargetInformationStub func(api string, apiVersion string, auth string, minCLIVersion string, doppler string, uaa string, routing string, skipSSLValidation bool) 134 setTargetInformationMutex sync.RWMutex 135 setTargetInformationArgsForCall []struct { 136 api string 137 apiVersion string 138 auth string 139 minCLIVersion string 140 doppler string 141 uaa string 142 routing string 143 skipSSLValidation bool 144 } 145 SetTokenInformationStub func(accessToken string, refreshToken string, sshOAuthClient string) 146 setTokenInformationMutex sync.RWMutex 147 setTokenInformationArgsForCall []struct { 148 accessToken string 149 refreshToken string 150 sshOAuthClient string 151 } 152 StagingTimeoutStub func() time.Duration 153 stagingTimeoutMutex sync.RWMutex 154 stagingTimeoutArgsForCall []struct{} 155 stagingTimeoutReturns struct { 156 result1 time.Duration 157 } 158 StartupTimeoutStub func() time.Duration 159 startupTimeoutMutex sync.RWMutex 160 startupTimeoutArgsForCall []struct{} 161 startupTimeoutReturns struct { 162 result1 time.Duration 163 } 164 SkipSSLValidationStub func() bool 165 skipSSLValidationMutex sync.RWMutex 166 skipSSLValidationArgsForCall []struct{} 167 skipSSLValidationReturns struct { 168 result1 bool 169 } 170 TargetStub func() string 171 targetMutex sync.RWMutex 172 targetArgsForCall []struct{} 173 targetReturns struct { 174 result1 string 175 } 176 TargetedOrganizationStub func() configv3.Organization 177 targetedOrganizationMutex sync.RWMutex 178 targetedOrganizationArgsForCall []struct{} 179 targetedOrganizationReturns struct { 180 result1 configv3.Organization 181 } 182 TargetedSpaceStub func() configv3.Space 183 targetedSpaceMutex sync.RWMutex 184 targetedSpaceArgsForCall []struct{} 185 targetedSpaceReturns struct { 186 result1 configv3.Space 187 } 188 UAAOAuthClientStub func() string 189 uAAOAuthClientMutex sync.RWMutex 190 uAAOAuthClientArgsForCall []struct{} 191 uAAOAuthClientReturns struct { 192 result1 string 193 } 194 UAAOAuthClientSecretStub func() string 195 uAAOAuthClientSecretMutex sync.RWMutex 196 uAAOAuthClientSecretArgsForCall []struct{} 197 uAAOAuthClientSecretReturns struct { 198 result1 string 199 } 200 UnsetSpaceInformationStub func() 201 unsetSpaceInformationMutex sync.RWMutex 202 unsetSpaceInformationArgsForCall []struct{} 203 UnsetOrganizationInformationStub func() 204 unsetOrganizationInformationMutex sync.RWMutex 205 unsetOrganizationInformationArgsForCall []struct{} 206 VerboseStub func() (bool, []string) 207 verboseMutex sync.RWMutex 208 verboseArgsForCall []struct{} 209 verboseReturns struct { 210 result1 bool 211 result2 []string 212 } 213 invocations map[string][][]interface{} 214 invocationsMutex sync.RWMutex 215 } 216 217 func (fake *FakeConfig) APIVersion() string { 218 fake.aPIVersionMutex.Lock() 219 fake.aPIVersionArgsForCall = append(fake.aPIVersionArgsForCall, struct{}{}) 220 fake.recordInvocation("APIVersion", []interface{}{}) 221 fake.aPIVersionMutex.Unlock() 222 if fake.APIVersionStub != nil { 223 return fake.APIVersionStub() 224 } else { 225 return fake.aPIVersionReturns.result1 226 } 227 } 228 229 func (fake *FakeConfig) APIVersionCallCount() int { 230 fake.aPIVersionMutex.RLock() 231 defer fake.aPIVersionMutex.RUnlock() 232 return len(fake.aPIVersionArgsForCall) 233 } 234 235 func (fake *FakeConfig) APIVersionReturns(result1 string) { 236 fake.APIVersionStub = nil 237 fake.aPIVersionReturns = struct { 238 result1 string 239 }{result1} 240 } 241 242 func (fake *FakeConfig) AccessToken() string { 243 fake.accessTokenMutex.Lock() 244 fake.accessTokenArgsForCall = append(fake.accessTokenArgsForCall, struct{}{}) 245 fake.recordInvocation("AccessToken", []interface{}{}) 246 fake.accessTokenMutex.Unlock() 247 if fake.AccessTokenStub != nil { 248 return fake.AccessTokenStub() 249 } else { 250 return fake.accessTokenReturns.result1 251 } 252 } 253 254 func (fake *FakeConfig) AccessTokenCallCount() int { 255 fake.accessTokenMutex.RLock() 256 defer fake.accessTokenMutex.RUnlock() 257 return len(fake.accessTokenArgsForCall) 258 } 259 260 func (fake *FakeConfig) AccessTokenReturns(result1 string) { 261 fake.AccessTokenStub = nil 262 fake.accessTokenReturns = struct { 263 result1 string 264 }{result1} 265 } 266 267 func (fake *FakeConfig) BinaryName() string { 268 fake.binaryNameMutex.Lock() 269 fake.binaryNameArgsForCall = append(fake.binaryNameArgsForCall, struct{}{}) 270 fake.recordInvocation("BinaryName", []interface{}{}) 271 fake.binaryNameMutex.Unlock() 272 if fake.BinaryNameStub != nil { 273 return fake.BinaryNameStub() 274 } else { 275 return fake.binaryNameReturns.result1 276 } 277 } 278 279 func (fake *FakeConfig) BinaryNameCallCount() int { 280 fake.binaryNameMutex.RLock() 281 defer fake.binaryNameMutex.RUnlock() 282 return len(fake.binaryNameArgsForCall) 283 } 284 285 func (fake *FakeConfig) BinaryNameReturns(result1 string) { 286 fake.BinaryNameStub = nil 287 fake.binaryNameReturns = struct { 288 result1 string 289 }{result1} 290 } 291 292 func (fake *FakeConfig) BinaryVersion() string { 293 fake.binaryVersionMutex.Lock() 294 fake.binaryVersionArgsForCall = append(fake.binaryVersionArgsForCall, struct{}{}) 295 fake.recordInvocation("BinaryVersion", []interface{}{}) 296 fake.binaryVersionMutex.Unlock() 297 if fake.BinaryVersionStub != nil { 298 return fake.BinaryVersionStub() 299 } else { 300 return fake.binaryVersionReturns.result1 301 } 302 } 303 304 func (fake *FakeConfig) BinaryVersionCallCount() int { 305 fake.binaryVersionMutex.RLock() 306 defer fake.binaryVersionMutex.RUnlock() 307 return len(fake.binaryVersionArgsForCall) 308 } 309 310 func (fake *FakeConfig) BinaryVersionReturns(result1 string) { 311 fake.BinaryVersionStub = nil 312 fake.binaryVersionReturns = struct { 313 result1 string 314 }{result1} 315 } 316 317 func (fake *FakeConfig) ColorEnabled() configv3.ColorSetting { 318 fake.colorEnabledMutex.Lock() 319 fake.colorEnabledArgsForCall = append(fake.colorEnabledArgsForCall, struct{}{}) 320 fake.recordInvocation("ColorEnabled", []interface{}{}) 321 fake.colorEnabledMutex.Unlock() 322 if fake.ColorEnabledStub != nil { 323 return fake.ColorEnabledStub() 324 } else { 325 return fake.colorEnabledReturns.result1 326 } 327 } 328 329 func (fake *FakeConfig) ColorEnabledCallCount() int { 330 fake.colorEnabledMutex.RLock() 331 defer fake.colorEnabledMutex.RUnlock() 332 return len(fake.colorEnabledArgsForCall) 333 } 334 335 func (fake *FakeConfig) ColorEnabledReturns(result1 configv3.ColorSetting) { 336 fake.ColorEnabledStub = nil 337 fake.colorEnabledReturns = struct { 338 result1 configv3.ColorSetting 339 }{result1} 340 } 341 342 func (fake *FakeConfig) CurrentUser() (configv3.User, error) { 343 fake.currentUserMutex.Lock() 344 fake.currentUserArgsForCall = append(fake.currentUserArgsForCall, struct{}{}) 345 fake.recordInvocation("CurrentUser", []interface{}{}) 346 fake.currentUserMutex.Unlock() 347 if fake.CurrentUserStub != nil { 348 return fake.CurrentUserStub() 349 } else { 350 return fake.currentUserReturns.result1, fake.currentUserReturns.result2 351 } 352 } 353 354 func (fake *FakeConfig) CurrentUserCallCount() int { 355 fake.currentUserMutex.RLock() 356 defer fake.currentUserMutex.RUnlock() 357 return len(fake.currentUserArgsForCall) 358 } 359 360 func (fake *FakeConfig) CurrentUserReturns(result1 configv3.User, result2 error) { 361 fake.CurrentUserStub = nil 362 fake.currentUserReturns = struct { 363 result1 configv3.User 364 result2 error 365 }{result1, result2} 366 } 367 368 func (fake *FakeConfig) DialTimeout() time.Duration { 369 fake.dialTimeoutMutex.Lock() 370 fake.dialTimeoutArgsForCall = append(fake.dialTimeoutArgsForCall, struct{}{}) 371 fake.recordInvocation("DialTimeout", []interface{}{}) 372 fake.dialTimeoutMutex.Unlock() 373 if fake.DialTimeoutStub != nil { 374 return fake.DialTimeoutStub() 375 } else { 376 return fake.dialTimeoutReturns.result1 377 } 378 } 379 380 func (fake *FakeConfig) DialTimeoutCallCount() int { 381 fake.dialTimeoutMutex.RLock() 382 defer fake.dialTimeoutMutex.RUnlock() 383 return len(fake.dialTimeoutArgsForCall) 384 } 385 386 func (fake *FakeConfig) DialTimeoutReturns(result1 time.Duration) { 387 fake.DialTimeoutStub = nil 388 fake.dialTimeoutReturns = struct { 389 result1 time.Duration 390 }{result1} 391 } 392 393 func (fake *FakeConfig) Experimental() bool { 394 fake.experimentalMutex.Lock() 395 fake.experimentalArgsForCall = append(fake.experimentalArgsForCall, struct{}{}) 396 fake.recordInvocation("Experimental", []interface{}{}) 397 fake.experimentalMutex.Unlock() 398 if fake.ExperimentalStub != nil { 399 return fake.ExperimentalStub() 400 } else { 401 return fake.experimentalReturns.result1 402 } 403 } 404 405 func (fake *FakeConfig) ExperimentalCallCount() int { 406 fake.experimentalMutex.RLock() 407 defer fake.experimentalMutex.RUnlock() 408 return len(fake.experimentalArgsForCall) 409 } 410 411 func (fake *FakeConfig) ExperimentalReturns(result1 bool) { 412 fake.ExperimentalStub = nil 413 fake.experimentalReturns = struct { 414 result1 bool 415 }{result1} 416 } 417 418 func (fake *FakeConfig) HasTargetedOrganization() bool { 419 fake.hasTargetedOrganizationMutex.Lock() 420 fake.hasTargetedOrganizationArgsForCall = append(fake.hasTargetedOrganizationArgsForCall, struct{}{}) 421 fake.recordInvocation("HasTargetedOrganization", []interface{}{}) 422 fake.hasTargetedOrganizationMutex.Unlock() 423 if fake.HasTargetedOrganizationStub != nil { 424 return fake.HasTargetedOrganizationStub() 425 } else { 426 return fake.hasTargetedOrganizationReturns.result1 427 } 428 } 429 430 func (fake *FakeConfig) HasTargetedOrganizationCallCount() int { 431 fake.hasTargetedOrganizationMutex.RLock() 432 defer fake.hasTargetedOrganizationMutex.RUnlock() 433 return len(fake.hasTargetedOrganizationArgsForCall) 434 } 435 436 func (fake *FakeConfig) HasTargetedOrganizationReturns(result1 bool) { 437 fake.HasTargetedOrganizationStub = nil 438 fake.hasTargetedOrganizationReturns = struct { 439 result1 bool 440 }{result1} 441 } 442 443 func (fake *FakeConfig) HasTargetedSpace() bool { 444 fake.hasTargetedSpaceMutex.Lock() 445 fake.hasTargetedSpaceArgsForCall = append(fake.hasTargetedSpaceArgsForCall, struct{}{}) 446 fake.recordInvocation("HasTargetedSpace", []interface{}{}) 447 fake.hasTargetedSpaceMutex.Unlock() 448 if fake.HasTargetedSpaceStub != nil { 449 return fake.HasTargetedSpaceStub() 450 } else { 451 return fake.hasTargetedSpaceReturns.result1 452 } 453 } 454 455 func (fake *FakeConfig) HasTargetedSpaceCallCount() int { 456 fake.hasTargetedSpaceMutex.RLock() 457 defer fake.hasTargetedSpaceMutex.RUnlock() 458 return len(fake.hasTargetedSpaceArgsForCall) 459 } 460 461 func (fake *FakeConfig) HasTargetedSpaceReturns(result1 bool) { 462 fake.HasTargetedSpaceStub = nil 463 fake.hasTargetedSpaceReturns = struct { 464 result1 bool 465 }{result1} 466 } 467 468 func (fake *FakeConfig) Locale() string { 469 fake.localeMutex.Lock() 470 fake.localeArgsForCall = append(fake.localeArgsForCall, struct{}{}) 471 fake.recordInvocation("Locale", []interface{}{}) 472 fake.localeMutex.Unlock() 473 if fake.LocaleStub != nil { 474 return fake.LocaleStub() 475 } else { 476 return fake.localeReturns.result1 477 } 478 } 479 480 func (fake *FakeConfig) LocaleCallCount() int { 481 fake.localeMutex.RLock() 482 defer fake.localeMutex.RUnlock() 483 return len(fake.localeArgsForCall) 484 } 485 486 func (fake *FakeConfig) LocaleReturns(result1 string) { 487 fake.LocaleStub = nil 488 fake.localeReturns = struct { 489 result1 string 490 }{result1} 491 } 492 493 func (fake *FakeConfig) MinCLIVersion() string { 494 fake.minCLIVersionMutex.Lock() 495 fake.minCLIVersionArgsForCall = append(fake.minCLIVersionArgsForCall, struct{}{}) 496 fake.recordInvocation("MinCLIVersion", []interface{}{}) 497 fake.minCLIVersionMutex.Unlock() 498 if fake.MinCLIVersionStub != nil { 499 return fake.MinCLIVersionStub() 500 } else { 501 return fake.minCLIVersionReturns.result1 502 } 503 } 504 505 func (fake *FakeConfig) MinCLIVersionCallCount() int { 506 fake.minCLIVersionMutex.RLock() 507 defer fake.minCLIVersionMutex.RUnlock() 508 return len(fake.minCLIVersionArgsForCall) 509 } 510 511 func (fake *FakeConfig) MinCLIVersionReturns(result1 string) { 512 fake.MinCLIVersionStub = nil 513 fake.minCLIVersionReturns = struct { 514 result1 string 515 }{result1} 516 } 517 518 func (fake *FakeConfig) OverallPollingTimeout() time.Duration { 519 fake.overallPollingTimeoutMutex.Lock() 520 fake.overallPollingTimeoutArgsForCall = append(fake.overallPollingTimeoutArgsForCall, struct{}{}) 521 fake.recordInvocation("OverallPollingTimeout", []interface{}{}) 522 fake.overallPollingTimeoutMutex.Unlock() 523 if fake.OverallPollingTimeoutStub != nil { 524 return fake.OverallPollingTimeoutStub() 525 } else { 526 return fake.overallPollingTimeoutReturns.result1 527 } 528 } 529 530 func (fake *FakeConfig) OverallPollingTimeoutCallCount() int { 531 fake.overallPollingTimeoutMutex.RLock() 532 defer fake.overallPollingTimeoutMutex.RUnlock() 533 return len(fake.overallPollingTimeoutArgsForCall) 534 } 535 536 func (fake *FakeConfig) OverallPollingTimeoutReturns(result1 time.Duration) { 537 fake.OverallPollingTimeoutStub = nil 538 fake.overallPollingTimeoutReturns = struct { 539 result1 time.Duration 540 }{result1} 541 } 542 543 func (fake *FakeConfig) Plugins() map[string]configv3.Plugin { 544 fake.pluginsMutex.Lock() 545 fake.pluginsArgsForCall = append(fake.pluginsArgsForCall, struct{}{}) 546 fake.recordInvocation("Plugins", []interface{}{}) 547 fake.pluginsMutex.Unlock() 548 if fake.PluginsStub != nil { 549 return fake.PluginsStub() 550 } else { 551 return fake.pluginsReturns.result1 552 } 553 } 554 555 func (fake *FakeConfig) PluginsCallCount() int { 556 fake.pluginsMutex.RLock() 557 defer fake.pluginsMutex.RUnlock() 558 return len(fake.pluginsArgsForCall) 559 } 560 561 func (fake *FakeConfig) PluginsReturns(result1 map[string]configv3.Plugin) { 562 fake.PluginsStub = nil 563 fake.pluginsReturns = struct { 564 result1 map[string]configv3.Plugin 565 }{result1} 566 } 567 568 func (fake *FakeConfig) PollingInterval() time.Duration { 569 fake.pollingIntervalMutex.Lock() 570 fake.pollingIntervalArgsForCall = append(fake.pollingIntervalArgsForCall, struct{}{}) 571 fake.recordInvocation("PollingInterval", []interface{}{}) 572 fake.pollingIntervalMutex.Unlock() 573 if fake.PollingIntervalStub != nil { 574 return fake.PollingIntervalStub() 575 } else { 576 return fake.pollingIntervalReturns.result1 577 } 578 } 579 580 func (fake *FakeConfig) PollingIntervalCallCount() int { 581 fake.pollingIntervalMutex.RLock() 582 defer fake.pollingIntervalMutex.RUnlock() 583 return len(fake.pollingIntervalArgsForCall) 584 } 585 586 func (fake *FakeConfig) PollingIntervalReturns(result1 time.Duration) { 587 fake.PollingIntervalStub = nil 588 fake.pollingIntervalReturns = struct { 589 result1 time.Duration 590 }{result1} 591 } 592 593 func (fake *FakeConfig) RefreshToken() string { 594 fake.refreshTokenMutex.Lock() 595 fake.refreshTokenArgsForCall = append(fake.refreshTokenArgsForCall, struct{}{}) 596 fake.recordInvocation("RefreshToken", []interface{}{}) 597 fake.refreshTokenMutex.Unlock() 598 if fake.RefreshTokenStub != nil { 599 return fake.RefreshTokenStub() 600 } else { 601 return fake.refreshTokenReturns.result1 602 } 603 } 604 605 func (fake *FakeConfig) RefreshTokenCallCount() int { 606 fake.refreshTokenMutex.RLock() 607 defer fake.refreshTokenMutex.RUnlock() 608 return len(fake.refreshTokenArgsForCall) 609 } 610 611 func (fake *FakeConfig) RefreshTokenReturns(result1 string) { 612 fake.RefreshTokenStub = nil 613 fake.refreshTokenReturns = struct { 614 result1 string 615 }{result1} 616 } 617 618 func (fake *FakeConfig) SetAccessToken(token string) { 619 fake.setAccessTokenMutex.Lock() 620 fake.setAccessTokenArgsForCall = append(fake.setAccessTokenArgsForCall, struct { 621 token string 622 }{token}) 623 fake.recordInvocation("SetAccessToken", []interface{}{token}) 624 fake.setAccessTokenMutex.Unlock() 625 if fake.SetAccessTokenStub != nil { 626 fake.SetAccessTokenStub(token) 627 } 628 } 629 630 func (fake *FakeConfig) SetAccessTokenCallCount() int { 631 fake.setAccessTokenMutex.RLock() 632 defer fake.setAccessTokenMutex.RUnlock() 633 return len(fake.setAccessTokenArgsForCall) 634 } 635 636 func (fake *FakeConfig) SetAccessTokenArgsForCall(i int) string { 637 fake.setAccessTokenMutex.RLock() 638 defer fake.setAccessTokenMutex.RUnlock() 639 return fake.setAccessTokenArgsForCall[i].token 640 } 641 642 func (fake *FakeConfig) SetOrganizationInformation(guid string, name string) { 643 fake.setOrganizationInformationMutex.Lock() 644 fake.setOrganizationInformationArgsForCall = append(fake.setOrganizationInformationArgsForCall, struct { 645 guid string 646 name string 647 }{guid, name}) 648 fake.recordInvocation("SetOrganizationInformation", []interface{}{guid, name}) 649 fake.setOrganizationInformationMutex.Unlock() 650 if fake.SetOrganizationInformationStub != nil { 651 fake.SetOrganizationInformationStub(guid, name) 652 } 653 } 654 655 func (fake *FakeConfig) SetOrganizationInformationCallCount() int { 656 fake.setOrganizationInformationMutex.RLock() 657 defer fake.setOrganizationInformationMutex.RUnlock() 658 return len(fake.setOrganizationInformationArgsForCall) 659 } 660 661 func (fake *FakeConfig) SetOrganizationInformationArgsForCall(i int) (string, string) { 662 fake.setOrganizationInformationMutex.RLock() 663 defer fake.setOrganizationInformationMutex.RUnlock() 664 return fake.setOrganizationInformationArgsForCall[i].guid, fake.setOrganizationInformationArgsForCall[i].name 665 } 666 667 func (fake *FakeConfig) SetRefreshToken(token string) { 668 fake.setRefreshTokenMutex.Lock() 669 fake.setRefreshTokenArgsForCall = append(fake.setRefreshTokenArgsForCall, struct { 670 token string 671 }{token}) 672 fake.recordInvocation("SetRefreshToken", []interface{}{token}) 673 fake.setRefreshTokenMutex.Unlock() 674 if fake.SetRefreshTokenStub != nil { 675 fake.SetRefreshTokenStub(token) 676 } 677 } 678 679 func (fake *FakeConfig) SetRefreshTokenCallCount() int { 680 fake.setRefreshTokenMutex.RLock() 681 defer fake.setRefreshTokenMutex.RUnlock() 682 return len(fake.setRefreshTokenArgsForCall) 683 } 684 685 func (fake *FakeConfig) SetRefreshTokenArgsForCall(i int) string { 686 fake.setRefreshTokenMutex.RLock() 687 defer fake.setRefreshTokenMutex.RUnlock() 688 return fake.setRefreshTokenArgsForCall[i].token 689 } 690 691 func (fake *FakeConfig) SetSpaceInformation(guid string, name string, allowSSH bool) { 692 fake.setSpaceInformationMutex.Lock() 693 fake.setSpaceInformationArgsForCall = append(fake.setSpaceInformationArgsForCall, struct { 694 guid string 695 name string 696 allowSSH bool 697 }{guid, name, allowSSH}) 698 fake.recordInvocation("SetSpaceInformation", []interface{}{guid, name, allowSSH}) 699 fake.setSpaceInformationMutex.Unlock() 700 if fake.SetSpaceInformationStub != nil { 701 fake.SetSpaceInformationStub(guid, name, allowSSH) 702 } 703 } 704 705 func (fake *FakeConfig) SetSpaceInformationCallCount() int { 706 fake.setSpaceInformationMutex.RLock() 707 defer fake.setSpaceInformationMutex.RUnlock() 708 return len(fake.setSpaceInformationArgsForCall) 709 } 710 711 func (fake *FakeConfig) SetSpaceInformationArgsForCall(i int) (string, string, bool) { 712 fake.setSpaceInformationMutex.RLock() 713 defer fake.setSpaceInformationMutex.RUnlock() 714 return fake.setSpaceInformationArgsForCall[i].guid, fake.setSpaceInformationArgsForCall[i].name, fake.setSpaceInformationArgsForCall[i].allowSSH 715 } 716 717 func (fake *FakeConfig) SetTargetInformation(api string, apiVersion string, auth string, minCLIVersion string, doppler string, uaa string, routing string, skipSSLValidation bool) { 718 fake.setTargetInformationMutex.Lock() 719 fake.setTargetInformationArgsForCall = append(fake.setTargetInformationArgsForCall, struct { 720 api string 721 apiVersion string 722 auth string 723 minCLIVersion string 724 doppler string 725 uaa string 726 routing string 727 skipSSLValidation bool 728 }{api, apiVersion, auth, minCLIVersion, doppler, uaa, routing, skipSSLValidation}) 729 fake.recordInvocation("SetTargetInformation", []interface{}{api, apiVersion, auth, minCLIVersion, doppler, uaa, routing, skipSSLValidation}) 730 fake.setTargetInformationMutex.Unlock() 731 if fake.SetTargetInformationStub != nil { 732 fake.SetTargetInformationStub(api, apiVersion, auth, minCLIVersion, doppler, uaa, routing, skipSSLValidation) 733 } 734 } 735 736 func (fake *FakeConfig) SetTargetInformationCallCount() int { 737 fake.setTargetInformationMutex.RLock() 738 defer fake.setTargetInformationMutex.RUnlock() 739 return len(fake.setTargetInformationArgsForCall) 740 } 741 742 func (fake *FakeConfig) SetTargetInformationArgsForCall(i int) (string, string, string, string, string, string, string, bool) { 743 fake.setTargetInformationMutex.RLock() 744 defer fake.setTargetInformationMutex.RUnlock() 745 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 746 } 747 748 func (fake *FakeConfig) SetTokenInformation(accessToken string, refreshToken string, sshOAuthClient string) { 749 fake.setTokenInformationMutex.Lock() 750 fake.setTokenInformationArgsForCall = append(fake.setTokenInformationArgsForCall, struct { 751 accessToken string 752 refreshToken string 753 sshOAuthClient string 754 }{accessToken, refreshToken, sshOAuthClient}) 755 fake.recordInvocation("SetTokenInformation", []interface{}{accessToken, refreshToken, sshOAuthClient}) 756 fake.setTokenInformationMutex.Unlock() 757 if fake.SetTokenInformationStub != nil { 758 fake.SetTokenInformationStub(accessToken, refreshToken, sshOAuthClient) 759 } 760 } 761 762 func (fake *FakeConfig) SetTokenInformationCallCount() int { 763 fake.setTokenInformationMutex.RLock() 764 defer fake.setTokenInformationMutex.RUnlock() 765 return len(fake.setTokenInformationArgsForCall) 766 } 767 768 func (fake *FakeConfig) SetTokenInformationArgsForCall(i int) (string, string, string) { 769 fake.setTokenInformationMutex.RLock() 770 defer fake.setTokenInformationMutex.RUnlock() 771 return fake.setTokenInformationArgsForCall[i].accessToken, fake.setTokenInformationArgsForCall[i].refreshToken, fake.setTokenInformationArgsForCall[i].sshOAuthClient 772 } 773 774 func (fake *FakeConfig) StagingTimeout() time.Duration { 775 fake.stagingTimeoutMutex.Lock() 776 fake.stagingTimeoutArgsForCall = append(fake.stagingTimeoutArgsForCall, struct{}{}) 777 fake.recordInvocation("StagingTimeout", []interface{}{}) 778 fake.stagingTimeoutMutex.Unlock() 779 if fake.StagingTimeoutStub != nil { 780 return fake.StagingTimeoutStub() 781 } else { 782 return fake.stagingTimeoutReturns.result1 783 } 784 } 785 786 func (fake *FakeConfig) StagingTimeoutCallCount() int { 787 fake.stagingTimeoutMutex.RLock() 788 defer fake.stagingTimeoutMutex.RUnlock() 789 return len(fake.stagingTimeoutArgsForCall) 790 } 791 792 func (fake *FakeConfig) StagingTimeoutReturns(result1 time.Duration) { 793 fake.StagingTimeoutStub = nil 794 fake.stagingTimeoutReturns = struct { 795 result1 time.Duration 796 }{result1} 797 } 798 799 func (fake *FakeConfig) StartupTimeout() time.Duration { 800 fake.startupTimeoutMutex.Lock() 801 fake.startupTimeoutArgsForCall = append(fake.startupTimeoutArgsForCall, struct{}{}) 802 fake.recordInvocation("StartupTimeout", []interface{}{}) 803 fake.startupTimeoutMutex.Unlock() 804 if fake.StartupTimeoutStub != nil { 805 return fake.StartupTimeoutStub() 806 } else { 807 return fake.startupTimeoutReturns.result1 808 } 809 } 810 811 func (fake *FakeConfig) StartupTimeoutCallCount() int { 812 fake.startupTimeoutMutex.RLock() 813 defer fake.startupTimeoutMutex.RUnlock() 814 return len(fake.startupTimeoutArgsForCall) 815 } 816 817 func (fake *FakeConfig) StartupTimeoutReturns(result1 time.Duration) { 818 fake.StartupTimeoutStub = nil 819 fake.startupTimeoutReturns = struct { 820 result1 time.Duration 821 }{result1} 822 } 823 824 func (fake *FakeConfig) SkipSSLValidation() bool { 825 fake.skipSSLValidationMutex.Lock() 826 fake.skipSSLValidationArgsForCall = append(fake.skipSSLValidationArgsForCall, struct{}{}) 827 fake.recordInvocation("SkipSSLValidation", []interface{}{}) 828 fake.skipSSLValidationMutex.Unlock() 829 if fake.SkipSSLValidationStub != nil { 830 return fake.SkipSSLValidationStub() 831 } else { 832 return fake.skipSSLValidationReturns.result1 833 } 834 } 835 836 func (fake *FakeConfig) SkipSSLValidationCallCount() int { 837 fake.skipSSLValidationMutex.RLock() 838 defer fake.skipSSLValidationMutex.RUnlock() 839 return len(fake.skipSSLValidationArgsForCall) 840 } 841 842 func (fake *FakeConfig) SkipSSLValidationReturns(result1 bool) { 843 fake.SkipSSLValidationStub = nil 844 fake.skipSSLValidationReturns = struct { 845 result1 bool 846 }{result1} 847 } 848 849 func (fake *FakeConfig) Target() string { 850 fake.targetMutex.Lock() 851 fake.targetArgsForCall = append(fake.targetArgsForCall, struct{}{}) 852 fake.recordInvocation("Target", []interface{}{}) 853 fake.targetMutex.Unlock() 854 if fake.TargetStub != nil { 855 return fake.TargetStub() 856 } else { 857 return fake.targetReturns.result1 858 } 859 } 860 861 func (fake *FakeConfig) TargetCallCount() int { 862 fake.targetMutex.RLock() 863 defer fake.targetMutex.RUnlock() 864 return len(fake.targetArgsForCall) 865 } 866 867 func (fake *FakeConfig) TargetReturns(result1 string) { 868 fake.TargetStub = nil 869 fake.targetReturns = struct { 870 result1 string 871 }{result1} 872 } 873 874 func (fake *FakeConfig) TargetedOrganization() configv3.Organization { 875 fake.targetedOrganizationMutex.Lock() 876 fake.targetedOrganizationArgsForCall = append(fake.targetedOrganizationArgsForCall, struct{}{}) 877 fake.recordInvocation("TargetedOrganization", []interface{}{}) 878 fake.targetedOrganizationMutex.Unlock() 879 if fake.TargetedOrganizationStub != nil { 880 return fake.TargetedOrganizationStub() 881 } else { 882 return fake.targetedOrganizationReturns.result1 883 } 884 } 885 886 func (fake *FakeConfig) TargetedOrganizationCallCount() int { 887 fake.targetedOrganizationMutex.RLock() 888 defer fake.targetedOrganizationMutex.RUnlock() 889 return len(fake.targetedOrganizationArgsForCall) 890 } 891 892 func (fake *FakeConfig) TargetedOrganizationReturns(result1 configv3.Organization) { 893 fake.TargetedOrganizationStub = nil 894 fake.targetedOrganizationReturns = struct { 895 result1 configv3.Organization 896 }{result1} 897 } 898 899 func (fake *FakeConfig) TargetedSpace() configv3.Space { 900 fake.targetedSpaceMutex.Lock() 901 fake.targetedSpaceArgsForCall = append(fake.targetedSpaceArgsForCall, struct{}{}) 902 fake.recordInvocation("TargetedSpace", []interface{}{}) 903 fake.targetedSpaceMutex.Unlock() 904 if fake.TargetedSpaceStub != nil { 905 return fake.TargetedSpaceStub() 906 } else { 907 return fake.targetedSpaceReturns.result1 908 } 909 } 910 911 func (fake *FakeConfig) TargetedSpaceCallCount() int { 912 fake.targetedSpaceMutex.RLock() 913 defer fake.targetedSpaceMutex.RUnlock() 914 return len(fake.targetedSpaceArgsForCall) 915 } 916 917 func (fake *FakeConfig) TargetedSpaceReturns(result1 configv3.Space) { 918 fake.TargetedSpaceStub = nil 919 fake.targetedSpaceReturns = struct { 920 result1 configv3.Space 921 }{result1} 922 } 923 924 func (fake *FakeConfig) UAAOAuthClient() string { 925 fake.uAAOAuthClientMutex.Lock() 926 fake.uAAOAuthClientArgsForCall = append(fake.uAAOAuthClientArgsForCall, struct{}{}) 927 fake.recordInvocation("UAAOAuthClient", []interface{}{}) 928 fake.uAAOAuthClientMutex.Unlock() 929 if fake.UAAOAuthClientStub != nil { 930 return fake.UAAOAuthClientStub() 931 } else { 932 return fake.uAAOAuthClientReturns.result1 933 } 934 } 935 936 func (fake *FakeConfig) UAAOAuthClientCallCount() int { 937 fake.uAAOAuthClientMutex.RLock() 938 defer fake.uAAOAuthClientMutex.RUnlock() 939 return len(fake.uAAOAuthClientArgsForCall) 940 } 941 942 func (fake *FakeConfig) UAAOAuthClientReturns(result1 string) { 943 fake.UAAOAuthClientStub = nil 944 fake.uAAOAuthClientReturns = struct { 945 result1 string 946 }{result1} 947 } 948 949 func (fake *FakeConfig) UAAOAuthClientSecret() string { 950 fake.uAAOAuthClientSecretMutex.Lock() 951 fake.uAAOAuthClientSecretArgsForCall = append(fake.uAAOAuthClientSecretArgsForCall, struct{}{}) 952 fake.recordInvocation("UAAOAuthClientSecret", []interface{}{}) 953 fake.uAAOAuthClientSecretMutex.Unlock() 954 if fake.UAAOAuthClientSecretStub != nil { 955 return fake.UAAOAuthClientSecretStub() 956 } else { 957 return fake.uAAOAuthClientSecretReturns.result1 958 } 959 } 960 961 func (fake *FakeConfig) UAAOAuthClientSecretCallCount() int { 962 fake.uAAOAuthClientSecretMutex.RLock() 963 defer fake.uAAOAuthClientSecretMutex.RUnlock() 964 return len(fake.uAAOAuthClientSecretArgsForCall) 965 } 966 967 func (fake *FakeConfig) UAAOAuthClientSecretReturns(result1 string) { 968 fake.UAAOAuthClientSecretStub = nil 969 fake.uAAOAuthClientSecretReturns = struct { 970 result1 string 971 }{result1} 972 } 973 974 func (fake *FakeConfig) UnsetSpaceInformation() { 975 fake.unsetSpaceInformationMutex.Lock() 976 fake.unsetSpaceInformationArgsForCall = append(fake.unsetSpaceInformationArgsForCall, struct{}{}) 977 fake.recordInvocation("UnsetSpaceInformation", []interface{}{}) 978 fake.unsetSpaceInformationMutex.Unlock() 979 if fake.UnsetSpaceInformationStub != nil { 980 fake.UnsetSpaceInformationStub() 981 } 982 } 983 984 func (fake *FakeConfig) UnsetSpaceInformationCallCount() int { 985 fake.unsetSpaceInformationMutex.RLock() 986 defer fake.unsetSpaceInformationMutex.RUnlock() 987 return len(fake.unsetSpaceInformationArgsForCall) 988 } 989 990 func (fake *FakeConfig) UnsetOrganizationInformation() { 991 fake.unsetOrganizationInformationMutex.Lock() 992 fake.unsetOrganizationInformationArgsForCall = append(fake.unsetOrganizationInformationArgsForCall, struct{}{}) 993 fake.recordInvocation("UnsetOrganizationInformation", []interface{}{}) 994 fake.unsetOrganizationInformationMutex.Unlock() 995 if fake.UnsetOrganizationInformationStub != nil { 996 fake.UnsetOrganizationInformationStub() 997 } 998 } 999 1000 func (fake *FakeConfig) UnsetOrganizationInformationCallCount() int { 1001 fake.unsetOrganizationInformationMutex.RLock() 1002 defer fake.unsetOrganizationInformationMutex.RUnlock() 1003 return len(fake.unsetOrganizationInformationArgsForCall) 1004 } 1005 1006 func (fake *FakeConfig) Verbose() (bool, []string) { 1007 fake.verboseMutex.Lock() 1008 fake.verboseArgsForCall = append(fake.verboseArgsForCall, struct{}{}) 1009 fake.recordInvocation("Verbose", []interface{}{}) 1010 fake.verboseMutex.Unlock() 1011 if fake.VerboseStub != nil { 1012 return fake.VerboseStub() 1013 } else { 1014 return fake.verboseReturns.result1, fake.verboseReturns.result2 1015 } 1016 } 1017 1018 func (fake *FakeConfig) VerboseCallCount() int { 1019 fake.verboseMutex.RLock() 1020 defer fake.verboseMutex.RUnlock() 1021 return len(fake.verboseArgsForCall) 1022 } 1023 1024 func (fake *FakeConfig) VerboseReturns(result1 bool, result2 []string) { 1025 fake.VerboseStub = nil 1026 fake.verboseReturns = struct { 1027 result1 bool 1028 result2 []string 1029 }{result1, result2} 1030 } 1031 1032 func (fake *FakeConfig) Invocations() map[string][][]interface{} { 1033 fake.invocationsMutex.RLock() 1034 defer fake.invocationsMutex.RUnlock() 1035 fake.aPIVersionMutex.RLock() 1036 defer fake.aPIVersionMutex.RUnlock() 1037 fake.accessTokenMutex.RLock() 1038 defer fake.accessTokenMutex.RUnlock() 1039 fake.binaryNameMutex.RLock() 1040 defer fake.binaryNameMutex.RUnlock() 1041 fake.binaryVersionMutex.RLock() 1042 defer fake.binaryVersionMutex.RUnlock() 1043 fake.colorEnabledMutex.RLock() 1044 defer fake.colorEnabledMutex.RUnlock() 1045 fake.currentUserMutex.RLock() 1046 defer fake.currentUserMutex.RUnlock() 1047 fake.dialTimeoutMutex.RLock() 1048 defer fake.dialTimeoutMutex.RUnlock() 1049 fake.experimentalMutex.RLock() 1050 defer fake.experimentalMutex.RUnlock() 1051 fake.hasTargetedOrganizationMutex.RLock() 1052 defer fake.hasTargetedOrganizationMutex.RUnlock() 1053 fake.hasTargetedSpaceMutex.RLock() 1054 defer fake.hasTargetedSpaceMutex.RUnlock() 1055 fake.localeMutex.RLock() 1056 defer fake.localeMutex.RUnlock() 1057 fake.minCLIVersionMutex.RLock() 1058 defer fake.minCLIVersionMutex.RUnlock() 1059 fake.overallPollingTimeoutMutex.RLock() 1060 defer fake.overallPollingTimeoutMutex.RUnlock() 1061 fake.pluginsMutex.RLock() 1062 defer fake.pluginsMutex.RUnlock() 1063 fake.pollingIntervalMutex.RLock() 1064 defer fake.pollingIntervalMutex.RUnlock() 1065 fake.refreshTokenMutex.RLock() 1066 defer fake.refreshTokenMutex.RUnlock() 1067 fake.setAccessTokenMutex.RLock() 1068 defer fake.setAccessTokenMutex.RUnlock() 1069 fake.setOrganizationInformationMutex.RLock() 1070 defer fake.setOrganizationInformationMutex.RUnlock() 1071 fake.setRefreshTokenMutex.RLock() 1072 defer fake.setRefreshTokenMutex.RUnlock() 1073 fake.setSpaceInformationMutex.RLock() 1074 defer fake.setSpaceInformationMutex.RUnlock() 1075 fake.setTargetInformationMutex.RLock() 1076 defer fake.setTargetInformationMutex.RUnlock() 1077 fake.setTokenInformationMutex.RLock() 1078 defer fake.setTokenInformationMutex.RUnlock() 1079 fake.stagingTimeoutMutex.RLock() 1080 defer fake.stagingTimeoutMutex.RUnlock() 1081 fake.startupTimeoutMutex.RLock() 1082 defer fake.startupTimeoutMutex.RUnlock() 1083 fake.skipSSLValidationMutex.RLock() 1084 defer fake.skipSSLValidationMutex.RUnlock() 1085 fake.targetMutex.RLock() 1086 defer fake.targetMutex.RUnlock() 1087 fake.targetedOrganizationMutex.RLock() 1088 defer fake.targetedOrganizationMutex.RUnlock() 1089 fake.targetedSpaceMutex.RLock() 1090 defer fake.targetedSpaceMutex.RUnlock() 1091 fake.uAAOAuthClientMutex.RLock() 1092 defer fake.uAAOAuthClientMutex.RUnlock() 1093 fake.uAAOAuthClientSecretMutex.RLock() 1094 defer fake.uAAOAuthClientSecretMutex.RUnlock() 1095 fake.unsetSpaceInformationMutex.RLock() 1096 defer fake.unsetSpaceInformationMutex.RUnlock() 1097 fake.unsetOrganizationInformationMutex.RLock() 1098 defer fake.unsetOrganizationInformationMutex.RUnlock() 1099 fake.verboseMutex.RLock() 1100 defer fake.verboseMutex.RUnlock() 1101 return fake.invocations 1102 } 1103 1104 func (fake *FakeConfig) recordInvocation(key string, args []interface{}) { 1105 fake.invocationsMutex.Lock() 1106 defer fake.invocationsMutex.Unlock() 1107 if fake.invocations == nil { 1108 fake.invocations = map[string][][]interface{}{} 1109 } 1110 if fake.invocations[key] == nil { 1111 fake.invocations[key] = [][]interface{}{} 1112 } 1113 fake.invocations[key] = append(fake.invocations[key], args) 1114 } 1115 1116 var _ command.Config = new(FakeConfig)