github.com/liamawhite/cli-with-i18n@v6.32.1-0.20171122084555-dede0a5c3448+incompatible/cf/actors/actorsfakes/fake_service_plan_actor.go (about) 1 // This file was generated by counterfeiter 2 package actorsfakes 3 4 import ( 5 "sync" 6 7 "github.com/liamawhite/cli-with-i18n/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 UpdateAllPlansForServiceStub func(string, bool) error 22 updateAllPlansForServiceMutex sync.RWMutex 23 updateAllPlansForServiceArgsForCall []struct { 24 arg1 string 25 arg2 bool 26 } 27 updateAllPlansForServiceReturns struct { 28 result1 error 29 } 30 UpdateOrgForServiceStub func(string, string, bool) error 31 updateOrgForServiceMutex sync.RWMutex 32 updateOrgForServiceArgsForCall []struct { 33 arg1 string 34 arg2 string 35 arg3 bool 36 } 37 updateOrgForServiceReturns struct { 38 result1 error 39 } 40 UpdateSinglePlanForServiceStub func(string, string, bool) error 41 updateSinglePlanForServiceMutex sync.RWMutex 42 updateSinglePlanForServiceArgsForCall []struct { 43 arg1 string 44 arg2 string 45 arg3 bool 46 } 47 updateSinglePlanForServiceReturns 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 invocations map[string][][]interface{} 62 invocationsMutex sync.RWMutex 63 } 64 65 func (fake *FakeServicePlanActor) FindServiceAccess(arg1 string, arg2 string) (actors.ServiceAccess, error) { 66 fake.findServiceAccessMutex.Lock() 67 fake.findServiceAccessArgsForCall = append(fake.findServiceAccessArgsForCall, struct { 68 arg1 string 69 arg2 string 70 }{arg1, arg2}) 71 fake.recordInvocation("FindServiceAccess", []interface{}{arg1, arg2}) 72 fake.findServiceAccessMutex.Unlock() 73 if fake.FindServiceAccessStub != nil { 74 return fake.FindServiceAccessStub(arg1, arg2) 75 } else { 76 return fake.findServiceAccessReturns.result1, fake.findServiceAccessReturns.result2 77 } 78 } 79 80 func (fake *FakeServicePlanActor) FindServiceAccessCallCount() int { 81 fake.findServiceAccessMutex.RLock() 82 defer fake.findServiceAccessMutex.RUnlock() 83 return len(fake.findServiceAccessArgsForCall) 84 } 85 86 func (fake *FakeServicePlanActor) FindServiceAccessArgsForCall(i int) (string, string) { 87 fake.findServiceAccessMutex.RLock() 88 defer fake.findServiceAccessMutex.RUnlock() 89 return fake.findServiceAccessArgsForCall[i].arg1, fake.findServiceAccessArgsForCall[i].arg2 90 } 91 92 func (fake *FakeServicePlanActor) FindServiceAccessReturns(result1 actors.ServiceAccess, result2 error) { 93 fake.FindServiceAccessStub = nil 94 fake.findServiceAccessReturns = struct { 95 result1 actors.ServiceAccess 96 result2 error 97 }{result1, result2} 98 } 99 100 func (fake *FakeServicePlanActor) UpdateAllPlansForService(arg1 string, arg2 bool) error { 101 fake.updateAllPlansForServiceMutex.Lock() 102 fake.updateAllPlansForServiceArgsForCall = append(fake.updateAllPlansForServiceArgsForCall, struct { 103 arg1 string 104 arg2 bool 105 }{arg1, arg2}) 106 fake.recordInvocation("UpdateAllPlansForService", []interface{}{arg1, arg2}) 107 fake.updateAllPlansForServiceMutex.Unlock() 108 if fake.UpdateAllPlansForServiceStub != nil { 109 return fake.UpdateAllPlansForServiceStub(arg1, arg2) 110 } else { 111 return fake.updateAllPlansForServiceReturns.result1 112 } 113 } 114 115 func (fake *FakeServicePlanActor) UpdateAllPlansForServiceCallCount() int { 116 fake.updateAllPlansForServiceMutex.RLock() 117 defer fake.updateAllPlansForServiceMutex.RUnlock() 118 return len(fake.updateAllPlansForServiceArgsForCall) 119 } 120 121 func (fake *FakeServicePlanActor) UpdateAllPlansForServiceArgsForCall(i int) (string, bool) { 122 fake.updateAllPlansForServiceMutex.RLock() 123 defer fake.updateAllPlansForServiceMutex.RUnlock() 124 return fake.updateAllPlansForServiceArgsForCall[i].arg1, fake.updateAllPlansForServiceArgsForCall[i].arg2 125 } 126 127 func (fake *FakeServicePlanActor) UpdateAllPlansForServiceReturns(result1 error) { 128 fake.UpdateAllPlansForServiceStub = nil 129 fake.updateAllPlansForServiceReturns = struct { 130 result1 error 131 }{result1} 132 } 133 134 func (fake *FakeServicePlanActor) UpdateOrgForService(arg1 string, arg2 string, arg3 bool) error { 135 fake.updateOrgForServiceMutex.Lock() 136 fake.updateOrgForServiceArgsForCall = append(fake.updateOrgForServiceArgsForCall, struct { 137 arg1 string 138 arg2 string 139 arg3 bool 140 }{arg1, arg2, arg3}) 141 fake.recordInvocation("UpdateOrgForService", []interface{}{arg1, arg2, arg3}) 142 fake.updateOrgForServiceMutex.Unlock() 143 if fake.UpdateOrgForServiceStub != nil { 144 return fake.UpdateOrgForServiceStub(arg1, arg2, arg3) 145 } else { 146 return fake.updateOrgForServiceReturns.result1 147 } 148 } 149 150 func (fake *FakeServicePlanActor) UpdateOrgForServiceCallCount() int { 151 fake.updateOrgForServiceMutex.RLock() 152 defer fake.updateOrgForServiceMutex.RUnlock() 153 return len(fake.updateOrgForServiceArgsForCall) 154 } 155 156 func (fake *FakeServicePlanActor) UpdateOrgForServiceArgsForCall(i int) (string, string, bool) { 157 fake.updateOrgForServiceMutex.RLock() 158 defer fake.updateOrgForServiceMutex.RUnlock() 159 return fake.updateOrgForServiceArgsForCall[i].arg1, fake.updateOrgForServiceArgsForCall[i].arg2, fake.updateOrgForServiceArgsForCall[i].arg3 160 } 161 162 func (fake *FakeServicePlanActor) UpdateOrgForServiceReturns(result1 error) { 163 fake.UpdateOrgForServiceStub = nil 164 fake.updateOrgForServiceReturns = struct { 165 result1 error 166 }{result1} 167 } 168 169 func (fake *FakeServicePlanActor) UpdateSinglePlanForService(arg1 string, arg2 string, arg3 bool) error { 170 fake.updateSinglePlanForServiceMutex.Lock() 171 fake.updateSinglePlanForServiceArgsForCall = append(fake.updateSinglePlanForServiceArgsForCall, struct { 172 arg1 string 173 arg2 string 174 arg3 bool 175 }{arg1, arg2, arg3}) 176 fake.recordInvocation("UpdateSinglePlanForService", []interface{}{arg1, arg2, arg3}) 177 fake.updateSinglePlanForServiceMutex.Unlock() 178 if fake.UpdateSinglePlanForServiceStub != nil { 179 return fake.UpdateSinglePlanForServiceStub(arg1, arg2, arg3) 180 } else { 181 return fake.updateSinglePlanForServiceReturns.result1 182 } 183 } 184 185 func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceCallCount() int { 186 fake.updateSinglePlanForServiceMutex.RLock() 187 defer fake.updateSinglePlanForServiceMutex.RUnlock() 188 return len(fake.updateSinglePlanForServiceArgsForCall) 189 } 190 191 func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceArgsForCall(i int) (string, string, bool) { 192 fake.updateSinglePlanForServiceMutex.RLock() 193 defer fake.updateSinglePlanForServiceMutex.RUnlock() 194 return fake.updateSinglePlanForServiceArgsForCall[i].arg1, fake.updateSinglePlanForServiceArgsForCall[i].arg2, fake.updateSinglePlanForServiceArgsForCall[i].arg3 195 } 196 197 func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceReturns(result1 error) { 198 fake.UpdateSinglePlanForServiceStub = nil 199 fake.updateSinglePlanForServiceReturns = struct { 200 result1 error 201 }{result1} 202 } 203 204 func (fake *FakeServicePlanActor) UpdatePlanAndOrgForService(arg1 string, arg2 string, arg3 string, arg4 bool) error { 205 fake.updatePlanAndOrgForServiceMutex.Lock() 206 fake.updatePlanAndOrgForServiceArgsForCall = append(fake.updatePlanAndOrgForServiceArgsForCall, struct { 207 arg1 string 208 arg2 string 209 arg3 string 210 arg4 bool 211 }{arg1, arg2, arg3, arg4}) 212 fake.recordInvocation("UpdatePlanAndOrgForService", []interface{}{arg1, arg2, arg3, arg4}) 213 fake.updatePlanAndOrgForServiceMutex.Unlock() 214 if fake.UpdatePlanAndOrgForServiceStub != nil { 215 return fake.UpdatePlanAndOrgForServiceStub(arg1, arg2, arg3, arg4) 216 } else { 217 return fake.updatePlanAndOrgForServiceReturns.result1 218 } 219 } 220 221 func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceCallCount() int { 222 fake.updatePlanAndOrgForServiceMutex.RLock() 223 defer fake.updatePlanAndOrgForServiceMutex.RUnlock() 224 return len(fake.updatePlanAndOrgForServiceArgsForCall) 225 } 226 227 func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceArgsForCall(i int) (string, string, string, bool) { 228 fake.updatePlanAndOrgForServiceMutex.RLock() 229 defer fake.updatePlanAndOrgForServiceMutex.RUnlock() 230 return fake.updatePlanAndOrgForServiceArgsForCall[i].arg1, fake.updatePlanAndOrgForServiceArgsForCall[i].arg2, fake.updatePlanAndOrgForServiceArgsForCall[i].arg3, fake.updatePlanAndOrgForServiceArgsForCall[i].arg4 231 } 232 233 func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceReturns(result1 error) { 234 fake.UpdatePlanAndOrgForServiceStub = nil 235 fake.updatePlanAndOrgForServiceReturns = struct { 236 result1 error 237 }{result1} 238 } 239 240 func (fake *FakeServicePlanActor) Invocations() map[string][][]interface{} { 241 fake.invocationsMutex.RLock() 242 defer fake.invocationsMutex.RUnlock() 243 fake.findServiceAccessMutex.RLock() 244 defer fake.findServiceAccessMutex.RUnlock() 245 fake.updateAllPlansForServiceMutex.RLock() 246 defer fake.updateAllPlansForServiceMutex.RUnlock() 247 fake.updateOrgForServiceMutex.RLock() 248 defer fake.updateOrgForServiceMutex.RUnlock() 249 fake.updateSinglePlanForServiceMutex.RLock() 250 defer fake.updateSinglePlanForServiceMutex.RUnlock() 251 fake.updatePlanAndOrgForServiceMutex.RLock() 252 defer fake.updatePlanAndOrgForServiceMutex.RUnlock() 253 return fake.invocations 254 } 255 256 func (fake *FakeServicePlanActor) recordInvocation(key string, args []interface{}) { 257 fake.invocationsMutex.Lock() 258 defer fake.invocationsMutex.Unlock() 259 if fake.invocations == nil { 260 fake.invocations = map[string][][]interface{}{} 261 } 262 if fake.invocations[key] == nil { 263 fake.invocations[key] = [][]interface{}{} 264 } 265 fake.invocations[key] = append(fake.invocations[key], args) 266 } 267 268 var _ actors.ServicePlanActor = new(FakeServicePlanActor)