github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/api/uaa/uaafakes/fake_config.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package uaafakes
     3  
     4  import (
     5  	"sync"
     6  	"time"
     7  
     8  	"code.cloudfoundry.org/cli/api/uaa"
     9  )
    10  
    11  type FakeConfig struct {
    12  	BinaryNameStub        func() string
    13  	binaryNameMutex       sync.RWMutex
    14  	binaryNameArgsForCall []struct{}
    15  	binaryNameReturns     struct {
    16  		result1 string
    17  	}
    18  	binaryNameReturnsOnCall map[int]struct {
    19  		result1 string
    20  	}
    21  	BinaryVersionStub        func() string
    22  	binaryVersionMutex       sync.RWMutex
    23  	binaryVersionArgsForCall []struct{}
    24  	binaryVersionReturns     struct {
    25  		result1 string
    26  	}
    27  	binaryVersionReturnsOnCall map[int]struct {
    28  		result1 string
    29  	}
    30  	DialTimeoutStub        func() time.Duration
    31  	dialTimeoutMutex       sync.RWMutex
    32  	dialTimeoutArgsForCall []struct{}
    33  	dialTimeoutReturns     struct {
    34  		result1 time.Duration
    35  	}
    36  	dialTimeoutReturnsOnCall map[int]struct {
    37  		result1 time.Duration
    38  	}
    39  	UAAOAuthClientStub        func() string
    40  	uAAOAuthClientMutex       sync.RWMutex
    41  	uAAOAuthClientArgsForCall []struct{}
    42  	uAAOAuthClientReturns     struct {
    43  		result1 string
    44  	}
    45  	uAAOAuthClientReturnsOnCall map[int]struct {
    46  		result1 string
    47  	}
    48  	UAAOAuthClientSecretStub        func() string
    49  	uAAOAuthClientSecretMutex       sync.RWMutex
    50  	uAAOAuthClientSecretArgsForCall []struct{}
    51  	uAAOAuthClientSecretReturns     struct {
    52  		result1 string
    53  	}
    54  	uAAOAuthClientSecretReturnsOnCall map[int]struct {
    55  		result1 string
    56  	}
    57  	UAAGrantTypeStub        func() string
    58  	uAAGrantTypeMutex       sync.RWMutex
    59  	uAAGrantTypeArgsForCall []struct{}
    60  	uAAGrantTypeReturns     struct {
    61  		result1 string
    62  	}
    63  	uAAGrantTypeReturnsOnCall map[int]struct {
    64  		result1 string
    65  	}
    66  	SetUAAEndpointStub        func(uaaEndpoint string)
    67  	setUAAEndpointMutex       sync.RWMutex
    68  	setUAAEndpointArgsForCall []struct {
    69  		uaaEndpoint string
    70  	}
    71  	SkipSSLValidationStub        func() bool
    72  	skipSSLValidationMutex       sync.RWMutex
    73  	skipSSLValidationArgsForCall []struct{}
    74  	skipSSLValidationReturns     struct {
    75  		result1 bool
    76  	}
    77  	skipSSLValidationReturnsOnCall map[int]struct {
    78  		result1 bool
    79  	}
    80  	invocations      map[string][][]interface{}
    81  	invocationsMutex sync.RWMutex
    82  }
    83  
    84  func (fake *FakeConfig) BinaryName() string {
    85  	fake.binaryNameMutex.Lock()
    86  	ret, specificReturn := fake.binaryNameReturnsOnCall[len(fake.binaryNameArgsForCall)]
    87  	fake.binaryNameArgsForCall = append(fake.binaryNameArgsForCall, struct{}{})
    88  	fake.recordInvocation("BinaryName", []interface{}{})
    89  	fake.binaryNameMutex.Unlock()
    90  	if fake.BinaryNameStub != nil {
    91  		return fake.BinaryNameStub()
    92  	}
    93  	if specificReturn {
    94  		return ret.result1
    95  	}
    96  	return fake.binaryNameReturns.result1
    97  }
    98  
    99  func (fake *FakeConfig) BinaryNameCallCount() int {
   100  	fake.binaryNameMutex.RLock()
   101  	defer fake.binaryNameMutex.RUnlock()
   102  	return len(fake.binaryNameArgsForCall)
   103  }
   104  
   105  func (fake *FakeConfig) BinaryNameReturns(result1 string) {
   106  	fake.BinaryNameStub = nil
   107  	fake.binaryNameReturns = struct {
   108  		result1 string
   109  	}{result1}
   110  }
   111  
   112  func (fake *FakeConfig) BinaryNameReturnsOnCall(i int, result1 string) {
   113  	fake.BinaryNameStub = nil
   114  	if fake.binaryNameReturnsOnCall == nil {
   115  		fake.binaryNameReturnsOnCall = make(map[int]struct {
   116  			result1 string
   117  		})
   118  	}
   119  	fake.binaryNameReturnsOnCall[i] = struct {
   120  		result1 string
   121  	}{result1}
   122  }
   123  
   124  func (fake *FakeConfig) BinaryVersion() string {
   125  	fake.binaryVersionMutex.Lock()
   126  	ret, specificReturn := fake.binaryVersionReturnsOnCall[len(fake.binaryVersionArgsForCall)]
   127  	fake.binaryVersionArgsForCall = append(fake.binaryVersionArgsForCall, struct{}{})
   128  	fake.recordInvocation("BinaryVersion", []interface{}{})
   129  	fake.binaryVersionMutex.Unlock()
   130  	if fake.BinaryVersionStub != nil {
   131  		return fake.BinaryVersionStub()
   132  	}
   133  	if specificReturn {
   134  		return ret.result1
   135  	}
   136  	return fake.binaryVersionReturns.result1
   137  }
   138  
   139  func (fake *FakeConfig) BinaryVersionCallCount() int {
   140  	fake.binaryVersionMutex.RLock()
   141  	defer fake.binaryVersionMutex.RUnlock()
   142  	return len(fake.binaryVersionArgsForCall)
   143  }
   144  
   145  func (fake *FakeConfig) BinaryVersionReturns(result1 string) {
   146  	fake.BinaryVersionStub = nil
   147  	fake.binaryVersionReturns = struct {
   148  		result1 string
   149  	}{result1}
   150  }
   151  
   152  func (fake *FakeConfig) BinaryVersionReturnsOnCall(i int, result1 string) {
   153  	fake.BinaryVersionStub = nil
   154  	if fake.binaryVersionReturnsOnCall == nil {
   155  		fake.binaryVersionReturnsOnCall = make(map[int]struct {
   156  			result1 string
   157  		})
   158  	}
   159  	fake.binaryVersionReturnsOnCall[i] = struct {
   160  		result1 string
   161  	}{result1}
   162  }
   163  
   164  func (fake *FakeConfig) DialTimeout() time.Duration {
   165  	fake.dialTimeoutMutex.Lock()
   166  	ret, specificReturn := fake.dialTimeoutReturnsOnCall[len(fake.dialTimeoutArgsForCall)]
   167  	fake.dialTimeoutArgsForCall = append(fake.dialTimeoutArgsForCall, struct{}{})
   168  	fake.recordInvocation("DialTimeout", []interface{}{})
   169  	fake.dialTimeoutMutex.Unlock()
   170  	if fake.DialTimeoutStub != nil {
   171  		return fake.DialTimeoutStub()
   172  	}
   173  	if specificReturn {
   174  		return ret.result1
   175  	}
   176  	return fake.dialTimeoutReturns.result1
   177  }
   178  
   179  func (fake *FakeConfig) DialTimeoutCallCount() int {
   180  	fake.dialTimeoutMutex.RLock()
   181  	defer fake.dialTimeoutMutex.RUnlock()
   182  	return len(fake.dialTimeoutArgsForCall)
   183  }
   184  
   185  func (fake *FakeConfig) DialTimeoutReturns(result1 time.Duration) {
   186  	fake.DialTimeoutStub = nil
   187  	fake.dialTimeoutReturns = struct {
   188  		result1 time.Duration
   189  	}{result1}
   190  }
   191  
   192  func (fake *FakeConfig) DialTimeoutReturnsOnCall(i int, result1 time.Duration) {
   193  	fake.DialTimeoutStub = nil
   194  	if fake.dialTimeoutReturnsOnCall == nil {
   195  		fake.dialTimeoutReturnsOnCall = make(map[int]struct {
   196  			result1 time.Duration
   197  		})
   198  	}
   199  	fake.dialTimeoutReturnsOnCall[i] = struct {
   200  		result1 time.Duration
   201  	}{result1}
   202  }
   203  
   204  func (fake *FakeConfig) UAAOAuthClient() string {
   205  	fake.uAAOAuthClientMutex.Lock()
   206  	ret, specificReturn := fake.uAAOAuthClientReturnsOnCall[len(fake.uAAOAuthClientArgsForCall)]
   207  	fake.uAAOAuthClientArgsForCall = append(fake.uAAOAuthClientArgsForCall, struct{}{})
   208  	fake.recordInvocation("UAAOAuthClient", []interface{}{})
   209  	fake.uAAOAuthClientMutex.Unlock()
   210  	if fake.UAAOAuthClientStub != nil {
   211  		return fake.UAAOAuthClientStub()
   212  	}
   213  	if specificReturn {
   214  		return ret.result1
   215  	}
   216  	return fake.uAAOAuthClientReturns.result1
   217  }
   218  
   219  func (fake *FakeConfig) UAAOAuthClientCallCount() int {
   220  	fake.uAAOAuthClientMutex.RLock()
   221  	defer fake.uAAOAuthClientMutex.RUnlock()
   222  	return len(fake.uAAOAuthClientArgsForCall)
   223  }
   224  
   225  func (fake *FakeConfig) UAAOAuthClientReturns(result1 string) {
   226  	fake.UAAOAuthClientStub = nil
   227  	fake.uAAOAuthClientReturns = struct {
   228  		result1 string
   229  	}{result1}
   230  }
   231  
   232  func (fake *FakeConfig) UAAOAuthClientReturnsOnCall(i int, result1 string) {
   233  	fake.UAAOAuthClientStub = nil
   234  	if fake.uAAOAuthClientReturnsOnCall == nil {
   235  		fake.uAAOAuthClientReturnsOnCall = make(map[int]struct {
   236  			result1 string
   237  		})
   238  	}
   239  	fake.uAAOAuthClientReturnsOnCall[i] = struct {
   240  		result1 string
   241  	}{result1}
   242  }
   243  
   244  func (fake *FakeConfig) UAAOAuthClientSecret() string {
   245  	fake.uAAOAuthClientSecretMutex.Lock()
   246  	ret, specificReturn := fake.uAAOAuthClientSecretReturnsOnCall[len(fake.uAAOAuthClientSecretArgsForCall)]
   247  	fake.uAAOAuthClientSecretArgsForCall = append(fake.uAAOAuthClientSecretArgsForCall, struct{}{})
   248  	fake.recordInvocation("UAAOAuthClientSecret", []interface{}{})
   249  	fake.uAAOAuthClientSecretMutex.Unlock()
   250  	if fake.UAAOAuthClientSecretStub != nil {
   251  		return fake.UAAOAuthClientSecretStub()
   252  	}
   253  	if specificReturn {
   254  		return ret.result1
   255  	}
   256  	return fake.uAAOAuthClientSecretReturns.result1
   257  }
   258  
   259  func (fake *FakeConfig) UAAOAuthClientSecretCallCount() int {
   260  	fake.uAAOAuthClientSecretMutex.RLock()
   261  	defer fake.uAAOAuthClientSecretMutex.RUnlock()
   262  	return len(fake.uAAOAuthClientSecretArgsForCall)
   263  }
   264  
   265  func (fake *FakeConfig) UAAOAuthClientSecretReturns(result1 string) {
   266  	fake.UAAOAuthClientSecretStub = nil
   267  	fake.uAAOAuthClientSecretReturns = struct {
   268  		result1 string
   269  	}{result1}
   270  }
   271  
   272  func (fake *FakeConfig) UAAOAuthClientSecretReturnsOnCall(i int, result1 string) {
   273  	fake.UAAOAuthClientSecretStub = nil
   274  	if fake.uAAOAuthClientSecretReturnsOnCall == nil {
   275  		fake.uAAOAuthClientSecretReturnsOnCall = make(map[int]struct {
   276  			result1 string
   277  		})
   278  	}
   279  	fake.uAAOAuthClientSecretReturnsOnCall[i] = struct {
   280  		result1 string
   281  	}{result1}
   282  }
   283  
   284  func (fake *FakeConfig) UAAGrantType() string {
   285  	fake.uAAGrantTypeMutex.Lock()
   286  	ret, specificReturn := fake.uAAGrantTypeReturnsOnCall[len(fake.uAAGrantTypeArgsForCall)]
   287  	fake.uAAGrantTypeArgsForCall = append(fake.uAAGrantTypeArgsForCall, struct{}{})
   288  	fake.recordInvocation("UAAGrantType", []interface{}{})
   289  	fake.uAAGrantTypeMutex.Unlock()
   290  	if fake.UAAGrantTypeStub != nil {
   291  		return fake.UAAGrantTypeStub()
   292  	}
   293  	if specificReturn {
   294  		return ret.result1
   295  	}
   296  	return fake.uAAGrantTypeReturns.result1
   297  }
   298  
   299  func (fake *FakeConfig) UAAGrantTypeCallCount() int {
   300  	fake.uAAGrantTypeMutex.RLock()
   301  	defer fake.uAAGrantTypeMutex.RUnlock()
   302  	return len(fake.uAAGrantTypeArgsForCall)
   303  }
   304  
   305  func (fake *FakeConfig) UAAGrantTypeReturns(result1 string) {
   306  	fake.UAAGrantTypeStub = nil
   307  	fake.uAAGrantTypeReturns = struct {
   308  		result1 string
   309  	}{result1}
   310  }
   311  
   312  func (fake *FakeConfig) UAAGrantTypeReturnsOnCall(i int, result1 string) {
   313  	fake.UAAGrantTypeStub = nil
   314  	if fake.uAAGrantTypeReturnsOnCall == nil {
   315  		fake.uAAGrantTypeReturnsOnCall = make(map[int]struct {
   316  			result1 string
   317  		})
   318  	}
   319  	fake.uAAGrantTypeReturnsOnCall[i] = struct {
   320  		result1 string
   321  	}{result1}
   322  }
   323  
   324  func (fake *FakeConfig) SetUAAEndpoint(uaaEndpoint string) {
   325  	fake.setUAAEndpointMutex.Lock()
   326  	fake.setUAAEndpointArgsForCall = append(fake.setUAAEndpointArgsForCall, struct {
   327  		uaaEndpoint string
   328  	}{uaaEndpoint})
   329  	fake.recordInvocation("SetUAAEndpoint", []interface{}{uaaEndpoint})
   330  	fake.setUAAEndpointMutex.Unlock()
   331  	if fake.SetUAAEndpointStub != nil {
   332  		fake.SetUAAEndpointStub(uaaEndpoint)
   333  	}
   334  }
   335  
   336  func (fake *FakeConfig) SetUAAEndpointCallCount() int {
   337  	fake.setUAAEndpointMutex.RLock()
   338  	defer fake.setUAAEndpointMutex.RUnlock()
   339  	return len(fake.setUAAEndpointArgsForCall)
   340  }
   341  
   342  func (fake *FakeConfig) SetUAAEndpointArgsForCall(i int) string {
   343  	fake.setUAAEndpointMutex.RLock()
   344  	defer fake.setUAAEndpointMutex.RUnlock()
   345  	return fake.setUAAEndpointArgsForCall[i].uaaEndpoint
   346  }
   347  
   348  func (fake *FakeConfig) SkipSSLValidation() bool {
   349  	fake.skipSSLValidationMutex.Lock()
   350  	ret, specificReturn := fake.skipSSLValidationReturnsOnCall[len(fake.skipSSLValidationArgsForCall)]
   351  	fake.skipSSLValidationArgsForCall = append(fake.skipSSLValidationArgsForCall, struct{}{})
   352  	fake.recordInvocation("SkipSSLValidation", []interface{}{})
   353  	fake.skipSSLValidationMutex.Unlock()
   354  	if fake.SkipSSLValidationStub != nil {
   355  		return fake.SkipSSLValidationStub()
   356  	}
   357  	if specificReturn {
   358  		return ret.result1
   359  	}
   360  	return fake.skipSSLValidationReturns.result1
   361  }
   362  
   363  func (fake *FakeConfig) SkipSSLValidationCallCount() int {
   364  	fake.skipSSLValidationMutex.RLock()
   365  	defer fake.skipSSLValidationMutex.RUnlock()
   366  	return len(fake.skipSSLValidationArgsForCall)
   367  }
   368  
   369  func (fake *FakeConfig) SkipSSLValidationReturns(result1 bool) {
   370  	fake.SkipSSLValidationStub = nil
   371  	fake.skipSSLValidationReturns = struct {
   372  		result1 bool
   373  	}{result1}
   374  }
   375  
   376  func (fake *FakeConfig) SkipSSLValidationReturnsOnCall(i int, result1 bool) {
   377  	fake.SkipSSLValidationStub = nil
   378  	if fake.skipSSLValidationReturnsOnCall == nil {
   379  		fake.skipSSLValidationReturnsOnCall = make(map[int]struct {
   380  			result1 bool
   381  		})
   382  	}
   383  	fake.skipSSLValidationReturnsOnCall[i] = struct {
   384  		result1 bool
   385  	}{result1}
   386  }
   387  
   388  func (fake *FakeConfig) Invocations() map[string][][]interface{} {
   389  	fake.invocationsMutex.RLock()
   390  	defer fake.invocationsMutex.RUnlock()
   391  	fake.binaryNameMutex.RLock()
   392  	defer fake.binaryNameMutex.RUnlock()
   393  	fake.binaryVersionMutex.RLock()
   394  	defer fake.binaryVersionMutex.RUnlock()
   395  	fake.dialTimeoutMutex.RLock()
   396  	defer fake.dialTimeoutMutex.RUnlock()
   397  	fake.uAAOAuthClientMutex.RLock()
   398  	defer fake.uAAOAuthClientMutex.RUnlock()
   399  	fake.uAAOAuthClientSecretMutex.RLock()
   400  	defer fake.uAAOAuthClientSecretMutex.RUnlock()
   401  	fake.uAAGrantTypeMutex.RLock()
   402  	defer fake.uAAGrantTypeMutex.RUnlock()
   403  	fake.setUAAEndpointMutex.RLock()
   404  	defer fake.setUAAEndpointMutex.RUnlock()
   405  	fake.skipSSLValidationMutex.RLock()
   406  	defer fake.skipSSLValidationMutex.RUnlock()
   407  	copiedInvocations := map[string][][]interface{}{}
   408  	for key, value := range fake.invocations {
   409  		copiedInvocations[key] = value
   410  	}
   411  	return copiedInvocations
   412  }
   413  
   414  func (fake *FakeConfig) recordInvocation(key string, args []interface{}) {
   415  	fake.invocationsMutex.Lock()
   416  	defer fake.invocationsMutex.Unlock()
   417  	if fake.invocations == nil {
   418  		fake.invocations = map[string][][]interface{}{}
   419  	}
   420  	if fake.invocations[key] == nil {
   421  		fake.invocations[key] = [][]interface{}{}
   422  	}
   423  	fake.invocations[key] = append(fake.invocations[key], args)
   424  }
   425  
   426  var _ uaa.Config = new(FakeConfig)