github.com/swisscom/cloudfoundry-cli@v7.1.0+incompatible/actor/v2action/composite/compositefakes/fake_visibility_actor.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package compositefakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"code.cloudfoundry.org/cli/actor/v2action"
     8  	"code.cloudfoundry.org/cli/actor/v2action/composite"
     9  )
    10  
    11  type FakeVisibilityActor struct {
    12  	GetServicePlanVisibilitiesStub        func(string) ([]v2action.ServicePlanVisibility, v2action.Warnings, error)
    13  	getServicePlanVisibilitiesMutex       sync.RWMutex
    14  	getServicePlanVisibilitiesArgsForCall []struct {
    15  		arg1 string
    16  	}
    17  	getServicePlanVisibilitiesReturns struct {
    18  		result1 []v2action.ServicePlanVisibility
    19  		result2 v2action.Warnings
    20  		result3 error
    21  	}
    22  	getServicePlanVisibilitiesReturnsOnCall map[int]struct {
    23  		result1 []v2action.ServicePlanVisibility
    24  		result2 v2action.Warnings
    25  		result3 error
    26  	}
    27  	invocations      map[string][][]interface{}
    28  	invocationsMutex sync.RWMutex
    29  }
    30  
    31  func (fake *FakeVisibilityActor) GetServicePlanVisibilities(arg1 string) ([]v2action.ServicePlanVisibility, v2action.Warnings, error) {
    32  	fake.getServicePlanVisibilitiesMutex.Lock()
    33  	ret, specificReturn := fake.getServicePlanVisibilitiesReturnsOnCall[len(fake.getServicePlanVisibilitiesArgsForCall)]
    34  	fake.getServicePlanVisibilitiesArgsForCall = append(fake.getServicePlanVisibilitiesArgsForCall, struct {
    35  		arg1 string
    36  	}{arg1})
    37  	fake.recordInvocation("GetServicePlanVisibilities", []interface{}{arg1})
    38  	fake.getServicePlanVisibilitiesMutex.Unlock()
    39  	if fake.GetServicePlanVisibilitiesStub != nil {
    40  		return fake.GetServicePlanVisibilitiesStub(arg1)
    41  	}
    42  	if specificReturn {
    43  		return ret.result1, ret.result2, ret.result3
    44  	}
    45  	fakeReturns := fake.getServicePlanVisibilitiesReturns
    46  	return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
    47  }
    48  
    49  func (fake *FakeVisibilityActor) GetServicePlanVisibilitiesCallCount() int {
    50  	fake.getServicePlanVisibilitiesMutex.RLock()
    51  	defer fake.getServicePlanVisibilitiesMutex.RUnlock()
    52  	return len(fake.getServicePlanVisibilitiesArgsForCall)
    53  }
    54  
    55  func (fake *FakeVisibilityActor) GetServicePlanVisibilitiesCalls(stub func(string) ([]v2action.ServicePlanVisibility, v2action.Warnings, error)) {
    56  	fake.getServicePlanVisibilitiesMutex.Lock()
    57  	defer fake.getServicePlanVisibilitiesMutex.Unlock()
    58  	fake.GetServicePlanVisibilitiesStub = stub
    59  }
    60  
    61  func (fake *FakeVisibilityActor) GetServicePlanVisibilitiesArgsForCall(i int) string {
    62  	fake.getServicePlanVisibilitiesMutex.RLock()
    63  	defer fake.getServicePlanVisibilitiesMutex.RUnlock()
    64  	argsForCall := fake.getServicePlanVisibilitiesArgsForCall[i]
    65  	return argsForCall.arg1
    66  }
    67  
    68  func (fake *FakeVisibilityActor) GetServicePlanVisibilitiesReturns(result1 []v2action.ServicePlanVisibility, result2 v2action.Warnings, result3 error) {
    69  	fake.getServicePlanVisibilitiesMutex.Lock()
    70  	defer fake.getServicePlanVisibilitiesMutex.Unlock()
    71  	fake.GetServicePlanVisibilitiesStub = nil
    72  	fake.getServicePlanVisibilitiesReturns = struct {
    73  		result1 []v2action.ServicePlanVisibility
    74  		result2 v2action.Warnings
    75  		result3 error
    76  	}{result1, result2, result3}
    77  }
    78  
    79  func (fake *FakeVisibilityActor) GetServicePlanVisibilitiesReturnsOnCall(i int, result1 []v2action.ServicePlanVisibility, result2 v2action.Warnings, result3 error) {
    80  	fake.getServicePlanVisibilitiesMutex.Lock()
    81  	defer fake.getServicePlanVisibilitiesMutex.Unlock()
    82  	fake.GetServicePlanVisibilitiesStub = nil
    83  	if fake.getServicePlanVisibilitiesReturnsOnCall == nil {
    84  		fake.getServicePlanVisibilitiesReturnsOnCall = make(map[int]struct {
    85  			result1 []v2action.ServicePlanVisibility
    86  			result2 v2action.Warnings
    87  			result3 error
    88  		})
    89  	}
    90  	fake.getServicePlanVisibilitiesReturnsOnCall[i] = struct {
    91  		result1 []v2action.ServicePlanVisibility
    92  		result2 v2action.Warnings
    93  		result3 error
    94  	}{result1, result2, result3}
    95  }
    96  
    97  func (fake *FakeVisibilityActor) Invocations() map[string][][]interface{} {
    98  	fake.invocationsMutex.RLock()
    99  	defer fake.invocationsMutex.RUnlock()
   100  	fake.getServicePlanVisibilitiesMutex.RLock()
   101  	defer fake.getServicePlanVisibilitiesMutex.RUnlock()
   102  	copiedInvocations := map[string][][]interface{}{}
   103  	for key, value := range fake.invocations {
   104  		copiedInvocations[key] = value
   105  	}
   106  	return copiedInvocations
   107  }
   108  
   109  func (fake *FakeVisibilityActor) recordInvocation(key string, args []interface{}) {
   110  	fake.invocationsMutex.Lock()
   111  	defer fake.invocationsMutex.Unlock()
   112  	if fake.invocations == nil {
   113  		fake.invocations = map[string][][]interface{}{}
   114  	}
   115  	if fake.invocations[key] == nil {
   116  		fake.invocations[key] = [][]interface{}{}
   117  	}
   118  	fake.invocations[key] = append(fake.invocations[key], args)
   119  }
   120  
   121  var _ composite.VisibilityActor = new(FakeVisibilityActor)