github.com/swisscom/cloudfoundry-cli@v7.1.0+incompatible/cf/actors/actorsfakes/fake_service_plan_actor.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package actorsfakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"code.cloudfoundry.org/cli/cf/actors"
     8  )
     9  
    10  type FakeServicePlanActor struct {
    11  	FindServiceAccessStub        func(string, string) (actors.ServiceAccess, error)
    12  	findServiceAccessMutex       sync.RWMutex
    13  	findServiceAccessArgsForCall []struct {
    14  		arg1 string
    15  		arg2 string
    16  	}
    17  	findServiceAccessReturns struct {
    18  		result1 actors.ServiceAccess
    19  		result2 error
    20  	}
    21  	findServiceAccessReturnsOnCall map[int]struct {
    22  		result1 actors.ServiceAccess
    23  		result2 error
    24  	}
    25  	UpdateAllPlansForServiceStub        func(string, bool) error
    26  	updateAllPlansForServiceMutex       sync.RWMutex
    27  	updateAllPlansForServiceArgsForCall []struct {
    28  		arg1 string
    29  		arg2 bool
    30  	}
    31  	updateAllPlansForServiceReturns struct {
    32  		result1 error
    33  	}
    34  	updateAllPlansForServiceReturnsOnCall map[int]struct {
    35  		result1 error
    36  	}
    37  	UpdateOrgForServiceStub        func(string, string, bool) error
    38  	updateOrgForServiceMutex       sync.RWMutex
    39  	updateOrgForServiceArgsForCall []struct {
    40  		arg1 string
    41  		arg2 string
    42  		arg3 bool
    43  	}
    44  	updateOrgForServiceReturns struct {
    45  		result1 error
    46  	}
    47  	updateOrgForServiceReturnsOnCall map[int]struct {
    48  		result1 error
    49  	}
    50  	UpdatePlanAndOrgForServiceStub        func(string, string, string, bool) error
    51  	updatePlanAndOrgForServiceMutex       sync.RWMutex
    52  	updatePlanAndOrgForServiceArgsForCall []struct {
    53  		arg1 string
    54  		arg2 string
    55  		arg3 string
    56  		arg4 bool
    57  	}
    58  	updatePlanAndOrgForServiceReturns struct {
    59  		result1 error
    60  	}
    61  	updatePlanAndOrgForServiceReturnsOnCall map[int]struct {
    62  		result1 error
    63  	}
    64  	UpdateSinglePlanForServiceStub        func(string, string, bool) error
    65  	updateSinglePlanForServiceMutex       sync.RWMutex
    66  	updateSinglePlanForServiceArgsForCall []struct {
    67  		arg1 string
    68  		arg2 string
    69  		arg3 bool
    70  	}
    71  	updateSinglePlanForServiceReturns struct {
    72  		result1 error
    73  	}
    74  	updateSinglePlanForServiceReturnsOnCall map[int]struct {
    75  		result1 error
    76  	}
    77  	invocations      map[string][][]interface{}
    78  	invocationsMutex sync.RWMutex
    79  }
    80  
    81  func (fake *FakeServicePlanActor) FindServiceAccess(arg1 string, arg2 string) (actors.ServiceAccess, error) {
    82  	fake.findServiceAccessMutex.Lock()
    83  	ret, specificReturn := fake.findServiceAccessReturnsOnCall[len(fake.findServiceAccessArgsForCall)]
    84  	fake.findServiceAccessArgsForCall = append(fake.findServiceAccessArgsForCall, struct {
    85  		arg1 string
    86  		arg2 string
    87  	}{arg1, arg2})
    88  	fake.recordInvocation("FindServiceAccess", []interface{}{arg1, arg2})
    89  	fake.findServiceAccessMutex.Unlock()
    90  	if fake.FindServiceAccessStub != nil {
    91  		return fake.FindServiceAccessStub(arg1, arg2)
    92  	}
    93  	if specificReturn {
    94  		return ret.result1, ret.result2
    95  	}
    96  	fakeReturns := fake.findServiceAccessReturns
    97  	return fakeReturns.result1, fakeReturns.result2
    98  }
    99  
   100  func (fake *FakeServicePlanActor) FindServiceAccessCallCount() int {
   101  	fake.findServiceAccessMutex.RLock()
   102  	defer fake.findServiceAccessMutex.RUnlock()
   103  	return len(fake.findServiceAccessArgsForCall)
   104  }
   105  
   106  func (fake *FakeServicePlanActor) FindServiceAccessCalls(stub func(string, string) (actors.ServiceAccess, error)) {
   107  	fake.findServiceAccessMutex.Lock()
   108  	defer fake.findServiceAccessMutex.Unlock()
   109  	fake.FindServiceAccessStub = stub
   110  }
   111  
   112  func (fake *FakeServicePlanActor) FindServiceAccessArgsForCall(i int) (string, string) {
   113  	fake.findServiceAccessMutex.RLock()
   114  	defer fake.findServiceAccessMutex.RUnlock()
   115  	argsForCall := fake.findServiceAccessArgsForCall[i]
   116  	return argsForCall.arg1, argsForCall.arg2
   117  }
   118  
   119  func (fake *FakeServicePlanActor) FindServiceAccessReturns(result1 actors.ServiceAccess, result2 error) {
   120  	fake.findServiceAccessMutex.Lock()
   121  	defer fake.findServiceAccessMutex.Unlock()
   122  	fake.FindServiceAccessStub = nil
   123  	fake.findServiceAccessReturns = struct {
   124  		result1 actors.ServiceAccess
   125  		result2 error
   126  	}{result1, result2}
   127  }
   128  
   129  func (fake *FakeServicePlanActor) FindServiceAccessReturnsOnCall(i int, result1 actors.ServiceAccess, result2 error) {
   130  	fake.findServiceAccessMutex.Lock()
   131  	defer fake.findServiceAccessMutex.Unlock()
   132  	fake.FindServiceAccessStub = nil
   133  	if fake.findServiceAccessReturnsOnCall == nil {
   134  		fake.findServiceAccessReturnsOnCall = make(map[int]struct {
   135  			result1 actors.ServiceAccess
   136  			result2 error
   137  		})
   138  	}
   139  	fake.findServiceAccessReturnsOnCall[i] = struct {
   140  		result1 actors.ServiceAccess
   141  		result2 error
   142  	}{result1, result2}
   143  }
   144  
   145  func (fake *FakeServicePlanActor) UpdateAllPlansForService(arg1 string, arg2 bool) error {
   146  	fake.updateAllPlansForServiceMutex.Lock()
   147  	ret, specificReturn := fake.updateAllPlansForServiceReturnsOnCall[len(fake.updateAllPlansForServiceArgsForCall)]
   148  	fake.updateAllPlansForServiceArgsForCall = append(fake.updateAllPlansForServiceArgsForCall, struct {
   149  		arg1 string
   150  		arg2 bool
   151  	}{arg1, arg2})
   152  	fake.recordInvocation("UpdateAllPlansForService", []interface{}{arg1, arg2})
   153  	fake.updateAllPlansForServiceMutex.Unlock()
   154  	if fake.UpdateAllPlansForServiceStub != nil {
   155  		return fake.UpdateAllPlansForServiceStub(arg1, arg2)
   156  	}
   157  	if specificReturn {
   158  		return ret.result1
   159  	}
   160  	fakeReturns := fake.updateAllPlansForServiceReturns
   161  	return fakeReturns.result1
   162  }
   163  
   164  func (fake *FakeServicePlanActor) UpdateAllPlansForServiceCallCount() int {
   165  	fake.updateAllPlansForServiceMutex.RLock()
   166  	defer fake.updateAllPlansForServiceMutex.RUnlock()
   167  	return len(fake.updateAllPlansForServiceArgsForCall)
   168  }
   169  
   170  func (fake *FakeServicePlanActor) UpdateAllPlansForServiceCalls(stub func(string, bool) error) {
   171  	fake.updateAllPlansForServiceMutex.Lock()
   172  	defer fake.updateAllPlansForServiceMutex.Unlock()
   173  	fake.UpdateAllPlansForServiceStub = stub
   174  }
   175  
   176  func (fake *FakeServicePlanActor) UpdateAllPlansForServiceArgsForCall(i int) (string, bool) {
   177  	fake.updateAllPlansForServiceMutex.RLock()
   178  	defer fake.updateAllPlansForServiceMutex.RUnlock()
   179  	argsForCall := fake.updateAllPlansForServiceArgsForCall[i]
   180  	return argsForCall.arg1, argsForCall.arg2
   181  }
   182  
   183  func (fake *FakeServicePlanActor) UpdateAllPlansForServiceReturns(result1 error) {
   184  	fake.updateAllPlansForServiceMutex.Lock()
   185  	defer fake.updateAllPlansForServiceMutex.Unlock()
   186  	fake.UpdateAllPlansForServiceStub = nil
   187  	fake.updateAllPlansForServiceReturns = struct {
   188  		result1 error
   189  	}{result1}
   190  }
   191  
   192  func (fake *FakeServicePlanActor) UpdateAllPlansForServiceReturnsOnCall(i int, result1 error) {
   193  	fake.updateAllPlansForServiceMutex.Lock()
   194  	defer fake.updateAllPlansForServiceMutex.Unlock()
   195  	fake.UpdateAllPlansForServiceStub = nil
   196  	if fake.updateAllPlansForServiceReturnsOnCall == nil {
   197  		fake.updateAllPlansForServiceReturnsOnCall = make(map[int]struct {
   198  			result1 error
   199  		})
   200  	}
   201  	fake.updateAllPlansForServiceReturnsOnCall[i] = struct {
   202  		result1 error
   203  	}{result1}
   204  }
   205  
   206  func (fake *FakeServicePlanActor) UpdateOrgForService(arg1 string, arg2 string, arg3 bool) error {
   207  	fake.updateOrgForServiceMutex.Lock()
   208  	ret, specificReturn := fake.updateOrgForServiceReturnsOnCall[len(fake.updateOrgForServiceArgsForCall)]
   209  	fake.updateOrgForServiceArgsForCall = append(fake.updateOrgForServiceArgsForCall, struct {
   210  		arg1 string
   211  		arg2 string
   212  		arg3 bool
   213  	}{arg1, arg2, arg3})
   214  	fake.recordInvocation("UpdateOrgForService", []interface{}{arg1, arg2, arg3})
   215  	fake.updateOrgForServiceMutex.Unlock()
   216  	if fake.UpdateOrgForServiceStub != nil {
   217  		return fake.UpdateOrgForServiceStub(arg1, arg2, arg3)
   218  	}
   219  	if specificReturn {
   220  		return ret.result1
   221  	}
   222  	fakeReturns := fake.updateOrgForServiceReturns
   223  	return fakeReturns.result1
   224  }
   225  
   226  func (fake *FakeServicePlanActor) UpdateOrgForServiceCallCount() int {
   227  	fake.updateOrgForServiceMutex.RLock()
   228  	defer fake.updateOrgForServiceMutex.RUnlock()
   229  	return len(fake.updateOrgForServiceArgsForCall)
   230  }
   231  
   232  func (fake *FakeServicePlanActor) UpdateOrgForServiceCalls(stub func(string, string, bool) error) {
   233  	fake.updateOrgForServiceMutex.Lock()
   234  	defer fake.updateOrgForServiceMutex.Unlock()
   235  	fake.UpdateOrgForServiceStub = stub
   236  }
   237  
   238  func (fake *FakeServicePlanActor) UpdateOrgForServiceArgsForCall(i int) (string, string, bool) {
   239  	fake.updateOrgForServiceMutex.RLock()
   240  	defer fake.updateOrgForServiceMutex.RUnlock()
   241  	argsForCall := fake.updateOrgForServiceArgsForCall[i]
   242  	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
   243  }
   244  
   245  func (fake *FakeServicePlanActor) UpdateOrgForServiceReturns(result1 error) {
   246  	fake.updateOrgForServiceMutex.Lock()
   247  	defer fake.updateOrgForServiceMutex.Unlock()
   248  	fake.UpdateOrgForServiceStub = nil
   249  	fake.updateOrgForServiceReturns = struct {
   250  		result1 error
   251  	}{result1}
   252  }
   253  
   254  func (fake *FakeServicePlanActor) UpdateOrgForServiceReturnsOnCall(i int, result1 error) {
   255  	fake.updateOrgForServiceMutex.Lock()
   256  	defer fake.updateOrgForServiceMutex.Unlock()
   257  	fake.UpdateOrgForServiceStub = nil
   258  	if fake.updateOrgForServiceReturnsOnCall == nil {
   259  		fake.updateOrgForServiceReturnsOnCall = make(map[int]struct {
   260  			result1 error
   261  		})
   262  	}
   263  	fake.updateOrgForServiceReturnsOnCall[i] = struct {
   264  		result1 error
   265  	}{result1}
   266  }
   267  
   268  func (fake *FakeServicePlanActor) UpdatePlanAndOrgForService(arg1 string, arg2 string, arg3 string, arg4 bool) error {
   269  	fake.updatePlanAndOrgForServiceMutex.Lock()
   270  	ret, specificReturn := fake.updatePlanAndOrgForServiceReturnsOnCall[len(fake.updatePlanAndOrgForServiceArgsForCall)]
   271  	fake.updatePlanAndOrgForServiceArgsForCall = append(fake.updatePlanAndOrgForServiceArgsForCall, struct {
   272  		arg1 string
   273  		arg2 string
   274  		arg3 string
   275  		arg4 bool
   276  	}{arg1, arg2, arg3, arg4})
   277  	fake.recordInvocation("UpdatePlanAndOrgForService", []interface{}{arg1, arg2, arg3, arg4})
   278  	fake.updatePlanAndOrgForServiceMutex.Unlock()
   279  	if fake.UpdatePlanAndOrgForServiceStub != nil {
   280  		return fake.UpdatePlanAndOrgForServiceStub(arg1, arg2, arg3, arg4)
   281  	}
   282  	if specificReturn {
   283  		return ret.result1
   284  	}
   285  	fakeReturns := fake.updatePlanAndOrgForServiceReturns
   286  	return fakeReturns.result1
   287  }
   288  
   289  func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceCallCount() int {
   290  	fake.updatePlanAndOrgForServiceMutex.RLock()
   291  	defer fake.updatePlanAndOrgForServiceMutex.RUnlock()
   292  	return len(fake.updatePlanAndOrgForServiceArgsForCall)
   293  }
   294  
   295  func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceCalls(stub func(string, string, string, bool) error) {
   296  	fake.updatePlanAndOrgForServiceMutex.Lock()
   297  	defer fake.updatePlanAndOrgForServiceMutex.Unlock()
   298  	fake.UpdatePlanAndOrgForServiceStub = stub
   299  }
   300  
   301  func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceArgsForCall(i int) (string, string, string, bool) {
   302  	fake.updatePlanAndOrgForServiceMutex.RLock()
   303  	defer fake.updatePlanAndOrgForServiceMutex.RUnlock()
   304  	argsForCall := fake.updatePlanAndOrgForServiceArgsForCall[i]
   305  	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4
   306  }
   307  
   308  func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceReturns(result1 error) {
   309  	fake.updatePlanAndOrgForServiceMutex.Lock()
   310  	defer fake.updatePlanAndOrgForServiceMutex.Unlock()
   311  	fake.UpdatePlanAndOrgForServiceStub = nil
   312  	fake.updatePlanAndOrgForServiceReturns = struct {
   313  		result1 error
   314  	}{result1}
   315  }
   316  
   317  func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceReturnsOnCall(i int, result1 error) {
   318  	fake.updatePlanAndOrgForServiceMutex.Lock()
   319  	defer fake.updatePlanAndOrgForServiceMutex.Unlock()
   320  	fake.UpdatePlanAndOrgForServiceStub = nil
   321  	if fake.updatePlanAndOrgForServiceReturnsOnCall == nil {
   322  		fake.updatePlanAndOrgForServiceReturnsOnCall = make(map[int]struct {
   323  			result1 error
   324  		})
   325  	}
   326  	fake.updatePlanAndOrgForServiceReturnsOnCall[i] = struct {
   327  		result1 error
   328  	}{result1}
   329  }
   330  
   331  func (fake *FakeServicePlanActor) UpdateSinglePlanForService(arg1 string, arg2 string, arg3 bool) error {
   332  	fake.updateSinglePlanForServiceMutex.Lock()
   333  	ret, specificReturn := fake.updateSinglePlanForServiceReturnsOnCall[len(fake.updateSinglePlanForServiceArgsForCall)]
   334  	fake.updateSinglePlanForServiceArgsForCall = append(fake.updateSinglePlanForServiceArgsForCall, struct {
   335  		arg1 string
   336  		arg2 string
   337  		arg3 bool
   338  	}{arg1, arg2, arg3})
   339  	fake.recordInvocation("UpdateSinglePlanForService", []interface{}{arg1, arg2, arg3})
   340  	fake.updateSinglePlanForServiceMutex.Unlock()
   341  	if fake.UpdateSinglePlanForServiceStub != nil {
   342  		return fake.UpdateSinglePlanForServiceStub(arg1, arg2, arg3)
   343  	}
   344  	if specificReturn {
   345  		return ret.result1
   346  	}
   347  	fakeReturns := fake.updateSinglePlanForServiceReturns
   348  	return fakeReturns.result1
   349  }
   350  
   351  func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceCallCount() int {
   352  	fake.updateSinglePlanForServiceMutex.RLock()
   353  	defer fake.updateSinglePlanForServiceMutex.RUnlock()
   354  	return len(fake.updateSinglePlanForServiceArgsForCall)
   355  }
   356  
   357  func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceCalls(stub func(string, string, bool) error) {
   358  	fake.updateSinglePlanForServiceMutex.Lock()
   359  	defer fake.updateSinglePlanForServiceMutex.Unlock()
   360  	fake.UpdateSinglePlanForServiceStub = stub
   361  }
   362  
   363  func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceArgsForCall(i int) (string, string, bool) {
   364  	fake.updateSinglePlanForServiceMutex.RLock()
   365  	defer fake.updateSinglePlanForServiceMutex.RUnlock()
   366  	argsForCall := fake.updateSinglePlanForServiceArgsForCall[i]
   367  	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
   368  }
   369  
   370  func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceReturns(result1 error) {
   371  	fake.updateSinglePlanForServiceMutex.Lock()
   372  	defer fake.updateSinglePlanForServiceMutex.Unlock()
   373  	fake.UpdateSinglePlanForServiceStub = nil
   374  	fake.updateSinglePlanForServiceReturns = struct {
   375  		result1 error
   376  	}{result1}
   377  }
   378  
   379  func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceReturnsOnCall(i int, result1 error) {
   380  	fake.updateSinglePlanForServiceMutex.Lock()
   381  	defer fake.updateSinglePlanForServiceMutex.Unlock()
   382  	fake.UpdateSinglePlanForServiceStub = nil
   383  	if fake.updateSinglePlanForServiceReturnsOnCall == nil {
   384  		fake.updateSinglePlanForServiceReturnsOnCall = make(map[int]struct {
   385  			result1 error
   386  		})
   387  	}
   388  	fake.updateSinglePlanForServiceReturnsOnCall[i] = struct {
   389  		result1 error
   390  	}{result1}
   391  }
   392  
   393  func (fake *FakeServicePlanActor) Invocations() map[string][][]interface{} {
   394  	fake.invocationsMutex.RLock()
   395  	defer fake.invocationsMutex.RUnlock()
   396  	fake.findServiceAccessMutex.RLock()
   397  	defer fake.findServiceAccessMutex.RUnlock()
   398  	fake.updateAllPlansForServiceMutex.RLock()
   399  	defer fake.updateAllPlansForServiceMutex.RUnlock()
   400  	fake.updateOrgForServiceMutex.RLock()
   401  	defer fake.updateOrgForServiceMutex.RUnlock()
   402  	fake.updatePlanAndOrgForServiceMutex.RLock()
   403  	defer fake.updatePlanAndOrgForServiceMutex.RUnlock()
   404  	fake.updateSinglePlanForServiceMutex.RLock()
   405  	defer fake.updateSinglePlanForServiceMutex.RUnlock()
   406  	copiedInvocations := map[string][][]interface{}{}
   407  	for key, value := range fake.invocations {
   408  		copiedInvocations[key] = value
   409  	}
   410  	return copiedInvocations
   411  }
   412  
   413  func (fake *FakeServicePlanActor) recordInvocation(key string, args []interface{}) {
   414  	fake.invocationsMutex.Lock()
   415  	defer fake.invocationsMutex.Unlock()
   416  	if fake.invocations == nil {
   417  		fake.invocations = map[string][][]interface{}{}
   418  	}
   419  	if fake.invocations[key] == nil {
   420  		fake.invocations[key] = [][]interface{}{}
   421  	}
   422  	fake.invocations[key] = append(fake.invocations[key], args)
   423  }
   424  
   425  var _ actors.ServicePlanActor = new(FakeServicePlanActor)