github.com/orange-cloudfoundry/cli@v7.1.0+incompatible/command/v6/v6fakes/fake_unbind_service_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v6fakes 3 4 import ( 5 "sync" 6 7 "code.cloudfoundry.org/cli/actor/v2action" 8 v6 "code.cloudfoundry.org/cli/command/v6" 9 ) 10 11 type FakeUnbindServiceActor struct { 12 UnbindServiceBySpaceStub func(string, string, string) (v2action.ServiceBinding, v2action.Warnings, error) 13 unbindServiceBySpaceMutex sync.RWMutex 14 unbindServiceBySpaceArgsForCall []struct { 15 arg1 string 16 arg2 string 17 arg3 string 18 } 19 unbindServiceBySpaceReturns struct { 20 result1 v2action.ServiceBinding 21 result2 v2action.Warnings 22 result3 error 23 } 24 unbindServiceBySpaceReturnsOnCall map[int]struct { 25 result1 v2action.ServiceBinding 26 result2 v2action.Warnings 27 result3 error 28 } 29 invocations map[string][][]interface{} 30 invocationsMutex sync.RWMutex 31 } 32 33 func (fake *FakeUnbindServiceActor) UnbindServiceBySpace(arg1 string, arg2 string, arg3 string) (v2action.ServiceBinding, v2action.Warnings, error) { 34 fake.unbindServiceBySpaceMutex.Lock() 35 ret, specificReturn := fake.unbindServiceBySpaceReturnsOnCall[len(fake.unbindServiceBySpaceArgsForCall)] 36 fake.unbindServiceBySpaceArgsForCall = append(fake.unbindServiceBySpaceArgsForCall, struct { 37 arg1 string 38 arg2 string 39 arg3 string 40 }{arg1, arg2, arg3}) 41 fake.recordInvocation("UnbindServiceBySpace", []interface{}{arg1, arg2, arg3}) 42 fake.unbindServiceBySpaceMutex.Unlock() 43 if fake.UnbindServiceBySpaceStub != nil { 44 return fake.UnbindServiceBySpaceStub(arg1, arg2, arg3) 45 } 46 if specificReturn { 47 return ret.result1, ret.result2, ret.result3 48 } 49 fakeReturns := fake.unbindServiceBySpaceReturns 50 return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 51 } 52 53 func (fake *FakeUnbindServiceActor) UnbindServiceBySpaceCallCount() int { 54 fake.unbindServiceBySpaceMutex.RLock() 55 defer fake.unbindServiceBySpaceMutex.RUnlock() 56 return len(fake.unbindServiceBySpaceArgsForCall) 57 } 58 59 func (fake *FakeUnbindServiceActor) UnbindServiceBySpaceCalls(stub func(string, string, string) (v2action.ServiceBinding, v2action.Warnings, error)) { 60 fake.unbindServiceBySpaceMutex.Lock() 61 defer fake.unbindServiceBySpaceMutex.Unlock() 62 fake.UnbindServiceBySpaceStub = stub 63 } 64 65 func (fake *FakeUnbindServiceActor) UnbindServiceBySpaceArgsForCall(i int) (string, string, string) { 66 fake.unbindServiceBySpaceMutex.RLock() 67 defer fake.unbindServiceBySpaceMutex.RUnlock() 68 argsForCall := fake.unbindServiceBySpaceArgsForCall[i] 69 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 70 } 71 72 func (fake *FakeUnbindServiceActor) UnbindServiceBySpaceReturns(result1 v2action.ServiceBinding, result2 v2action.Warnings, result3 error) { 73 fake.unbindServiceBySpaceMutex.Lock() 74 defer fake.unbindServiceBySpaceMutex.Unlock() 75 fake.UnbindServiceBySpaceStub = nil 76 fake.unbindServiceBySpaceReturns = struct { 77 result1 v2action.ServiceBinding 78 result2 v2action.Warnings 79 result3 error 80 }{result1, result2, result3} 81 } 82 83 func (fake *FakeUnbindServiceActor) UnbindServiceBySpaceReturnsOnCall(i int, result1 v2action.ServiceBinding, result2 v2action.Warnings, result3 error) { 84 fake.unbindServiceBySpaceMutex.Lock() 85 defer fake.unbindServiceBySpaceMutex.Unlock() 86 fake.UnbindServiceBySpaceStub = nil 87 if fake.unbindServiceBySpaceReturnsOnCall == nil { 88 fake.unbindServiceBySpaceReturnsOnCall = make(map[int]struct { 89 result1 v2action.ServiceBinding 90 result2 v2action.Warnings 91 result3 error 92 }) 93 } 94 fake.unbindServiceBySpaceReturnsOnCall[i] = struct { 95 result1 v2action.ServiceBinding 96 result2 v2action.Warnings 97 result3 error 98 }{result1, result2, result3} 99 } 100 101 func (fake *FakeUnbindServiceActor) Invocations() map[string][][]interface{} { 102 fake.invocationsMutex.RLock() 103 defer fake.invocationsMutex.RUnlock() 104 fake.unbindServiceBySpaceMutex.RLock() 105 defer fake.unbindServiceBySpaceMutex.RUnlock() 106 copiedInvocations := map[string][][]interface{}{} 107 for key, value := range fake.invocations { 108 copiedInvocations[key] = value 109 } 110 return copiedInvocations 111 } 112 113 func (fake *FakeUnbindServiceActor) recordInvocation(key string, args []interface{}) { 114 fake.invocationsMutex.Lock() 115 defer fake.invocationsMutex.Unlock() 116 if fake.invocations == nil { 117 fake.invocations = map[string][][]interface{}{} 118 } 119 if fake.invocations[key] == nil { 120 fake.invocations[key] = [][]interface{}{} 121 } 122 fake.invocations[key] = append(fake.invocations[key], args) 123 } 124 125 var _ v6.UnbindServiceActor = new(FakeUnbindServiceActor)