github.com/orange-cloudfoundry/cli@v7.1.0+incompatible/command/v6/v6fakes/fake_v3cancel_zdt_push_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/v3action" 8 v6 "code.cloudfoundry.org/cli/command/v6" 9 ) 10 11 type FakeV3CancelZdtPushActor struct { 12 CancelDeploymentByAppNameAndSpaceStub func(string, string) (v3action.Warnings, error) 13 cancelDeploymentByAppNameAndSpaceMutex sync.RWMutex 14 cancelDeploymentByAppNameAndSpaceArgsForCall []struct { 15 arg1 string 16 arg2 string 17 } 18 cancelDeploymentByAppNameAndSpaceReturns struct { 19 result1 v3action.Warnings 20 result2 error 21 } 22 cancelDeploymentByAppNameAndSpaceReturnsOnCall map[int]struct { 23 result1 v3action.Warnings 24 result2 error 25 } 26 invocations map[string][][]interface{} 27 invocationsMutex sync.RWMutex 28 } 29 30 func (fake *FakeV3CancelZdtPushActor) CancelDeploymentByAppNameAndSpace(arg1 string, arg2 string) (v3action.Warnings, error) { 31 fake.cancelDeploymentByAppNameAndSpaceMutex.Lock() 32 ret, specificReturn := fake.cancelDeploymentByAppNameAndSpaceReturnsOnCall[len(fake.cancelDeploymentByAppNameAndSpaceArgsForCall)] 33 fake.cancelDeploymentByAppNameAndSpaceArgsForCall = append(fake.cancelDeploymentByAppNameAndSpaceArgsForCall, struct { 34 arg1 string 35 arg2 string 36 }{arg1, arg2}) 37 fake.recordInvocation("CancelDeploymentByAppNameAndSpace", []interface{}{arg1, arg2}) 38 fake.cancelDeploymentByAppNameAndSpaceMutex.Unlock() 39 if fake.CancelDeploymentByAppNameAndSpaceStub != nil { 40 return fake.CancelDeploymentByAppNameAndSpaceStub(arg1, arg2) 41 } 42 if specificReturn { 43 return ret.result1, ret.result2 44 } 45 fakeReturns := fake.cancelDeploymentByAppNameAndSpaceReturns 46 return fakeReturns.result1, fakeReturns.result2 47 } 48 49 func (fake *FakeV3CancelZdtPushActor) CancelDeploymentByAppNameAndSpaceCallCount() int { 50 fake.cancelDeploymentByAppNameAndSpaceMutex.RLock() 51 defer fake.cancelDeploymentByAppNameAndSpaceMutex.RUnlock() 52 return len(fake.cancelDeploymentByAppNameAndSpaceArgsForCall) 53 } 54 55 func (fake *FakeV3CancelZdtPushActor) CancelDeploymentByAppNameAndSpaceCalls(stub func(string, string) (v3action.Warnings, error)) { 56 fake.cancelDeploymentByAppNameAndSpaceMutex.Lock() 57 defer fake.cancelDeploymentByAppNameAndSpaceMutex.Unlock() 58 fake.CancelDeploymentByAppNameAndSpaceStub = stub 59 } 60 61 func (fake *FakeV3CancelZdtPushActor) CancelDeploymentByAppNameAndSpaceArgsForCall(i int) (string, string) { 62 fake.cancelDeploymentByAppNameAndSpaceMutex.RLock() 63 defer fake.cancelDeploymentByAppNameAndSpaceMutex.RUnlock() 64 argsForCall := fake.cancelDeploymentByAppNameAndSpaceArgsForCall[i] 65 return argsForCall.arg1, argsForCall.arg2 66 } 67 68 func (fake *FakeV3CancelZdtPushActor) CancelDeploymentByAppNameAndSpaceReturns(result1 v3action.Warnings, result2 error) { 69 fake.cancelDeploymentByAppNameAndSpaceMutex.Lock() 70 defer fake.cancelDeploymentByAppNameAndSpaceMutex.Unlock() 71 fake.CancelDeploymentByAppNameAndSpaceStub = nil 72 fake.cancelDeploymentByAppNameAndSpaceReturns = struct { 73 result1 v3action.Warnings 74 result2 error 75 }{result1, result2} 76 } 77 78 func (fake *FakeV3CancelZdtPushActor) CancelDeploymentByAppNameAndSpaceReturnsOnCall(i int, result1 v3action.Warnings, result2 error) { 79 fake.cancelDeploymentByAppNameAndSpaceMutex.Lock() 80 defer fake.cancelDeploymentByAppNameAndSpaceMutex.Unlock() 81 fake.CancelDeploymentByAppNameAndSpaceStub = nil 82 if fake.cancelDeploymentByAppNameAndSpaceReturnsOnCall == nil { 83 fake.cancelDeploymentByAppNameAndSpaceReturnsOnCall = make(map[int]struct { 84 result1 v3action.Warnings 85 result2 error 86 }) 87 } 88 fake.cancelDeploymentByAppNameAndSpaceReturnsOnCall[i] = struct { 89 result1 v3action.Warnings 90 result2 error 91 }{result1, result2} 92 } 93 94 func (fake *FakeV3CancelZdtPushActor) Invocations() map[string][][]interface{} { 95 fake.invocationsMutex.RLock() 96 defer fake.invocationsMutex.RUnlock() 97 fake.cancelDeploymentByAppNameAndSpaceMutex.RLock() 98 defer fake.cancelDeploymentByAppNameAndSpaceMutex.RUnlock() 99 copiedInvocations := map[string][][]interface{}{} 100 for key, value := range fake.invocations { 101 copiedInvocations[key] = value 102 } 103 return copiedInvocations 104 } 105 106 func (fake *FakeV3CancelZdtPushActor) recordInvocation(key string, args []interface{}) { 107 fake.invocationsMutex.Lock() 108 defer fake.invocationsMutex.Unlock() 109 if fake.invocations == nil { 110 fake.invocations = map[string][][]interface{}{} 111 } 112 if fake.invocations[key] == nil { 113 fake.invocations[key] = [][]interface{}{} 114 } 115 fake.invocations[key] = append(fake.invocations[key], args) 116 } 117 118 var _ v6.V3CancelZdtPushActor = new(FakeV3CancelZdtPushActor)