github.com/orange-cloudfoundry/cli@v7.1.0+incompatible/command/v6/v6fakes/fake_unshare_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/v2v3action" 8 v6 "code.cloudfoundry.org/cli/command/v6" 9 ) 10 11 type FakeUnshareServiceActor struct { 12 CloudControllerV3APIVersionStub func() string 13 cloudControllerV3APIVersionMutex sync.RWMutex 14 cloudControllerV3APIVersionArgsForCall []struct { 15 } 16 cloudControllerV3APIVersionReturns struct { 17 result1 string 18 } 19 cloudControllerV3APIVersionReturnsOnCall map[int]struct { 20 result1 string 21 } 22 UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceStub func(string, string, string, string) (v2v3action.Warnings, error) 23 unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex sync.RWMutex 24 unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceArgsForCall []struct { 25 arg1 string 26 arg2 string 27 arg3 string 28 arg4 string 29 } 30 unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceReturns struct { 31 result1 v2v3action.Warnings 32 result2 error 33 } 34 unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceReturnsOnCall map[int]struct { 35 result1 v2v3action.Warnings 36 result2 error 37 } 38 invocations map[string][][]interface{} 39 invocationsMutex sync.RWMutex 40 } 41 42 func (fake *FakeUnshareServiceActor) CloudControllerV3APIVersion() string { 43 fake.cloudControllerV3APIVersionMutex.Lock() 44 ret, specificReturn := fake.cloudControllerV3APIVersionReturnsOnCall[len(fake.cloudControllerV3APIVersionArgsForCall)] 45 fake.cloudControllerV3APIVersionArgsForCall = append(fake.cloudControllerV3APIVersionArgsForCall, struct { 46 }{}) 47 fake.recordInvocation("CloudControllerV3APIVersion", []interface{}{}) 48 fake.cloudControllerV3APIVersionMutex.Unlock() 49 if fake.CloudControllerV3APIVersionStub != nil { 50 return fake.CloudControllerV3APIVersionStub() 51 } 52 if specificReturn { 53 return ret.result1 54 } 55 fakeReturns := fake.cloudControllerV3APIVersionReturns 56 return fakeReturns.result1 57 } 58 59 func (fake *FakeUnshareServiceActor) CloudControllerV3APIVersionCallCount() int { 60 fake.cloudControllerV3APIVersionMutex.RLock() 61 defer fake.cloudControllerV3APIVersionMutex.RUnlock() 62 return len(fake.cloudControllerV3APIVersionArgsForCall) 63 } 64 65 func (fake *FakeUnshareServiceActor) CloudControllerV3APIVersionCalls(stub func() string) { 66 fake.cloudControllerV3APIVersionMutex.Lock() 67 defer fake.cloudControllerV3APIVersionMutex.Unlock() 68 fake.CloudControllerV3APIVersionStub = stub 69 } 70 71 func (fake *FakeUnshareServiceActor) CloudControllerV3APIVersionReturns(result1 string) { 72 fake.cloudControllerV3APIVersionMutex.Lock() 73 defer fake.cloudControllerV3APIVersionMutex.Unlock() 74 fake.CloudControllerV3APIVersionStub = nil 75 fake.cloudControllerV3APIVersionReturns = struct { 76 result1 string 77 }{result1} 78 } 79 80 func (fake *FakeUnshareServiceActor) CloudControllerV3APIVersionReturnsOnCall(i int, result1 string) { 81 fake.cloudControllerV3APIVersionMutex.Lock() 82 defer fake.cloudControllerV3APIVersionMutex.Unlock() 83 fake.CloudControllerV3APIVersionStub = nil 84 if fake.cloudControllerV3APIVersionReturnsOnCall == nil { 85 fake.cloudControllerV3APIVersionReturnsOnCall = make(map[int]struct { 86 result1 string 87 }) 88 } 89 fake.cloudControllerV3APIVersionReturnsOnCall[i] = struct { 90 result1 string 91 }{result1} 92 } 93 94 func (fake *FakeUnshareServiceActor) UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpace(arg1 string, arg2 string, arg3 string, arg4 string) (v2v3action.Warnings, error) { 95 fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.Lock() 96 ret, specificReturn := fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceReturnsOnCall[len(fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceArgsForCall)] 97 fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceArgsForCall = append(fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceArgsForCall, struct { 98 arg1 string 99 arg2 string 100 arg3 string 101 arg4 string 102 }{arg1, arg2, arg3, arg4}) 103 fake.recordInvocation("UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpace", []interface{}{arg1, arg2, arg3, arg4}) 104 fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.Unlock() 105 if fake.UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceStub != nil { 106 return fake.UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceStub(arg1, arg2, arg3, arg4) 107 } 108 if specificReturn { 109 return ret.result1, ret.result2 110 } 111 fakeReturns := fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceReturns 112 return fakeReturns.result1, fakeReturns.result2 113 } 114 115 func (fake *FakeUnshareServiceActor) UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceCallCount() int { 116 fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.RLock() 117 defer fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.RUnlock() 118 return len(fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceArgsForCall) 119 } 120 121 func (fake *FakeUnshareServiceActor) UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceCalls(stub func(string, string, string, string) (v2v3action.Warnings, error)) { 122 fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.Lock() 123 defer fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.Unlock() 124 fake.UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceStub = stub 125 } 126 127 func (fake *FakeUnshareServiceActor) UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceArgsForCall(i int) (string, string, string, string) { 128 fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.RLock() 129 defer fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.RUnlock() 130 argsForCall := fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceArgsForCall[i] 131 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 132 } 133 134 func (fake *FakeUnshareServiceActor) UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceReturns(result1 v2v3action.Warnings, result2 error) { 135 fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.Lock() 136 defer fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.Unlock() 137 fake.UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceStub = nil 138 fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceReturns = struct { 139 result1 v2v3action.Warnings 140 result2 error 141 }{result1, result2} 142 } 143 144 func (fake *FakeUnshareServiceActor) UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceReturnsOnCall(i int, result1 v2v3action.Warnings, result2 error) { 145 fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.Lock() 146 defer fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.Unlock() 147 fake.UnshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceStub = nil 148 if fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceReturnsOnCall == nil { 149 fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceReturnsOnCall = make(map[int]struct { 150 result1 v2v3action.Warnings 151 result2 error 152 }) 153 } 154 fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceReturnsOnCall[i] = struct { 155 result1 v2v3action.Warnings 156 result2 error 157 }{result1, result2} 158 } 159 160 func (fake *FakeUnshareServiceActor) Invocations() map[string][][]interface{} { 161 fake.invocationsMutex.RLock() 162 defer fake.invocationsMutex.RUnlock() 163 fake.cloudControllerV3APIVersionMutex.RLock() 164 defer fake.cloudControllerV3APIVersionMutex.RUnlock() 165 fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.RLock() 166 defer fake.unshareServiceInstanceFromOrganizationNameAndSpaceNameByNameAndSpaceMutex.RUnlock() 167 copiedInvocations := map[string][][]interface{}{} 168 for key, value := range fake.invocations { 169 copiedInvocations[key] = value 170 } 171 return copiedInvocations 172 } 173 174 func (fake *FakeUnshareServiceActor) recordInvocation(key string, args []interface{}) { 175 fake.invocationsMutex.Lock() 176 defer fake.invocationsMutex.Unlock() 177 if fake.invocations == nil { 178 fake.invocations = map[string][][]interface{}{} 179 } 180 if fake.invocations[key] == nil { 181 fake.invocations[key] = [][]interface{}{} 182 } 183 fake.invocations[key] = append(fake.invocations[key], args) 184 } 185 186 var _ v6.UnshareServiceActor = new(FakeUnshareServiceActor)