github.com/jenspinney/cli@v6.42.1-0.20190207184520-7450c600020e+incompatible/command/v7/v7fakes/fake_delete_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v7fakes 3 4 import ( 5 sync "sync" 6 7 v7action "code.cloudfoundry.org/cli/actor/v7action" 8 v7 "code.cloudfoundry.org/cli/command/v7" 9 ) 10 11 type FakeDeleteActor struct { 12 CloudControllerAPIVersionStub func() string 13 cloudControllerAPIVersionMutex sync.RWMutex 14 cloudControllerAPIVersionArgsForCall []struct { 15 } 16 cloudControllerAPIVersionReturns struct { 17 result1 string 18 } 19 cloudControllerAPIVersionReturnsOnCall map[int]struct { 20 result1 string 21 } 22 DeleteApplicationByNameAndSpaceStub func(string, string) (v7action.Warnings, error) 23 deleteApplicationByNameAndSpaceMutex sync.RWMutex 24 deleteApplicationByNameAndSpaceArgsForCall []struct { 25 arg1 string 26 arg2 string 27 } 28 deleteApplicationByNameAndSpaceReturns struct { 29 result1 v7action.Warnings 30 result2 error 31 } 32 deleteApplicationByNameAndSpaceReturnsOnCall map[int]struct { 33 result1 v7action.Warnings 34 result2 error 35 } 36 invocations map[string][][]interface{} 37 invocationsMutex sync.RWMutex 38 } 39 40 func (fake *FakeDeleteActor) CloudControllerAPIVersion() string { 41 fake.cloudControllerAPIVersionMutex.Lock() 42 ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)] 43 fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct { 44 }{}) 45 fake.recordInvocation("CloudControllerAPIVersion", []interface{}{}) 46 fake.cloudControllerAPIVersionMutex.Unlock() 47 if fake.CloudControllerAPIVersionStub != nil { 48 return fake.CloudControllerAPIVersionStub() 49 } 50 if specificReturn { 51 return ret.result1 52 } 53 fakeReturns := fake.cloudControllerAPIVersionReturns 54 return fakeReturns.result1 55 } 56 57 func (fake *FakeDeleteActor) CloudControllerAPIVersionCallCount() int { 58 fake.cloudControllerAPIVersionMutex.RLock() 59 defer fake.cloudControllerAPIVersionMutex.RUnlock() 60 return len(fake.cloudControllerAPIVersionArgsForCall) 61 } 62 63 func (fake *FakeDeleteActor) CloudControllerAPIVersionCalls(stub func() string) { 64 fake.cloudControllerAPIVersionMutex.Lock() 65 defer fake.cloudControllerAPIVersionMutex.Unlock() 66 fake.CloudControllerAPIVersionStub = stub 67 } 68 69 func (fake *FakeDeleteActor) CloudControllerAPIVersionReturns(result1 string) { 70 fake.cloudControllerAPIVersionMutex.Lock() 71 defer fake.cloudControllerAPIVersionMutex.Unlock() 72 fake.CloudControllerAPIVersionStub = nil 73 fake.cloudControllerAPIVersionReturns = struct { 74 result1 string 75 }{result1} 76 } 77 78 func (fake *FakeDeleteActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) { 79 fake.cloudControllerAPIVersionMutex.Lock() 80 defer fake.cloudControllerAPIVersionMutex.Unlock() 81 fake.CloudControllerAPIVersionStub = nil 82 if fake.cloudControllerAPIVersionReturnsOnCall == nil { 83 fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct { 84 result1 string 85 }) 86 } 87 fake.cloudControllerAPIVersionReturnsOnCall[i] = struct { 88 result1 string 89 }{result1} 90 } 91 92 func (fake *FakeDeleteActor) DeleteApplicationByNameAndSpace(arg1 string, arg2 string) (v7action.Warnings, error) { 93 fake.deleteApplicationByNameAndSpaceMutex.Lock() 94 ret, specificReturn := fake.deleteApplicationByNameAndSpaceReturnsOnCall[len(fake.deleteApplicationByNameAndSpaceArgsForCall)] 95 fake.deleteApplicationByNameAndSpaceArgsForCall = append(fake.deleteApplicationByNameAndSpaceArgsForCall, struct { 96 arg1 string 97 arg2 string 98 }{arg1, arg2}) 99 fake.recordInvocation("DeleteApplicationByNameAndSpace", []interface{}{arg1, arg2}) 100 fake.deleteApplicationByNameAndSpaceMutex.Unlock() 101 if fake.DeleteApplicationByNameAndSpaceStub != nil { 102 return fake.DeleteApplicationByNameAndSpaceStub(arg1, arg2) 103 } 104 if specificReturn { 105 return ret.result1, ret.result2 106 } 107 fakeReturns := fake.deleteApplicationByNameAndSpaceReturns 108 return fakeReturns.result1, fakeReturns.result2 109 } 110 111 func (fake *FakeDeleteActor) DeleteApplicationByNameAndSpaceCallCount() int { 112 fake.deleteApplicationByNameAndSpaceMutex.RLock() 113 defer fake.deleteApplicationByNameAndSpaceMutex.RUnlock() 114 return len(fake.deleteApplicationByNameAndSpaceArgsForCall) 115 } 116 117 func (fake *FakeDeleteActor) DeleteApplicationByNameAndSpaceCalls(stub func(string, string) (v7action.Warnings, error)) { 118 fake.deleteApplicationByNameAndSpaceMutex.Lock() 119 defer fake.deleteApplicationByNameAndSpaceMutex.Unlock() 120 fake.DeleteApplicationByNameAndSpaceStub = stub 121 } 122 123 func (fake *FakeDeleteActor) DeleteApplicationByNameAndSpaceArgsForCall(i int) (string, string) { 124 fake.deleteApplicationByNameAndSpaceMutex.RLock() 125 defer fake.deleteApplicationByNameAndSpaceMutex.RUnlock() 126 argsForCall := fake.deleteApplicationByNameAndSpaceArgsForCall[i] 127 return argsForCall.arg1, argsForCall.arg2 128 } 129 130 func (fake *FakeDeleteActor) DeleteApplicationByNameAndSpaceReturns(result1 v7action.Warnings, result2 error) { 131 fake.deleteApplicationByNameAndSpaceMutex.Lock() 132 defer fake.deleteApplicationByNameAndSpaceMutex.Unlock() 133 fake.DeleteApplicationByNameAndSpaceStub = nil 134 fake.deleteApplicationByNameAndSpaceReturns = struct { 135 result1 v7action.Warnings 136 result2 error 137 }{result1, result2} 138 } 139 140 func (fake *FakeDeleteActor) DeleteApplicationByNameAndSpaceReturnsOnCall(i int, result1 v7action.Warnings, result2 error) { 141 fake.deleteApplicationByNameAndSpaceMutex.Lock() 142 defer fake.deleteApplicationByNameAndSpaceMutex.Unlock() 143 fake.DeleteApplicationByNameAndSpaceStub = nil 144 if fake.deleteApplicationByNameAndSpaceReturnsOnCall == nil { 145 fake.deleteApplicationByNameAndSpaceReturnsOnCall = make(map[int]struct { 146 result1 v7action.Warnings 147 result2 error 148 }) 149 } 150 fake.deleteApplicationByNameAndSpaceReturnsOnCall[i] = struct { 151 result1 v7action.Warnings 152 result2 error 153 }{result1, result2} 154 } 155 156 func (fake *FakeDeleteActor) Invocations() map[string][][]interface{} { 157 fake.invocationsMutex.RLock() 158 defer fake.invocationsMutex.RUnlock() 159 fake.cloudControllerAPIVersionMutex.RLock() 160 defer fake.cloudControllerAPIVersionMutex.RUnlock() 161 fake.deleteApplicationByNameAndSpaceMutex.RLock() 162 defer fake.deleteApplicationByNameAndSpaceMutex.RUnlock() 163 copiedInvocations := map[string][][]interface{}{} 164 for key, value := range fake.invocations { 165 copiedInvocations[key] = value 166 } 167 return copiedInvocations 168 } 169 170 func (fake *FakeDeleteActor) recordInvocation(key string, args []interface{}) { 171 fake.invocationsMutex.Lock() 172 defer fake.invocationsMutex.Unlock() 173 if fake.invocations == nil { 174 fake.invocations = map[string][][]interface{}{} 175 } 176 if fake.invocations[key] == nil { 177 fake.invocations[key] = [][]interface{}{} 178 } 179 fake.invocations[key] = append(fake.invocations[key], args) 180 } 181 182 var _ v7.DeleteActor = new(FakeDeleteActor)