github.com/willmadison/cli@v6.40.1-0.20181018160101-29d5937903ff+incompatible/command/v6/v6fakes/fake_v3restart_app_instance_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v6fakes 3 4 import ( 5 sync "sync" 6 7 v3action "code.cloudfoundry.org/cli/actor/v3action" 8 v6 "code.cloudfoundry.org/cli/command/v6" 9 ) 10 11 type FakeV3RestartAppInstanceActor 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 DeleteInstanceByApplicationNameSpaceProcessTypeAndIndexStub func(string, string, string, int) (v3action.Warnings, error) 23 deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex sync.RWMutex 24 deleteInstanceByApplicationNameSpaceProcessTypeAndIndexArgsForCall []struct { 25 arg1 string 26 arg2 string 27 arg3 string 28 arg4 int 29 } 30 deleteInstanceByApplicationNameSpaceProcessTypeAndIndexReturns struct { 31 result1 v3action.Warnings 32 result2 error 33 } 34 deleteInstanceByApplicationNameSpaceProcessTypeAndIndexReturnsOnCall map[int]struct { 35 result1 v3action.Warnings 36 result2 error 37 } 38 invocations map[string][][]interface{} 39 invocationsMutex sync.RWMutex 40 } 41 42 func (fake *FakeV3RestartAppInstanceActor) CloudControllerAPIVersion() string { 43 fake.cloudControllerAPIVersionMutex.Lock() 44 ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)] 45 fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct { 46 }{}) 47 fake.recordInvocation("CloudControllerAPIVersion", []interface{}{}) 48 fake.cloudControllerAPIVersionMutex.Unlock() 49 if fake.CloudControllerAPIVersionStub != nil { 50 return fake.CloudControllerAPIVersionStub() 51 } 52 if specificReturn { 53 return ret.result1 54 } 55 fakeReturns := fake.cloudControllerAPIVersionReturns 56 return fakeReturns.result1 57 } 58 59 func (fake *FakeV3RestartAppInstanceActor) CloudControllerAPIVersionCallCount() int { 60 fake.cloudControllerAPIVersionMutex.RLock() 61 defer fake.cloudControllerAPIVersionMutex.RUnlock() 62 return len(fake.cloudControllerAPIVersionArgsForCall) 63 } 64 65 func (fake *FakeV3RestartAppInstanceActor) CloudControllerAPIVersionCalls(stub func() string) { 66 fake.cloudControllerAPIVersionMutex.Lock() 67 defer fake.cloudControllerAPIVersionMutex.Unlock() 68 fake.CloudControllerAPIVersionStub = stub 69 } 70 71 func (fake *FakeV3RestartAppInstanceActor) CloudControllerAPIVersionReturns(result1 string) { 72 fake.cloudControllerAPIVersionMutex.Lock() 73 defer fake.cloudControllerAPIVersionMutex.Unlock() 74 fake.CloudControllerAPIVersionStub = nil 75 fake.cloudControllerAPIVersionReturns = struct { 76 result1 string 77 }{result1} 78 } 79 80 func (fake *FakeV3RestartAppInstanceActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) { 81 fake.cloudControllerAPIVersionMutex.Lock() 82 defer fake.cloudControllerAPIVersionMutex.Unlock() 83 fake.CloudControllerAPIVersionStub = nil 84 if fake.cloudControllerAPIVersionReturnsOnCall == nil { 85 fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct { 86 result1 string 87 }) 88 } 89 fake.cloudControllerAPIVersionReturnsOnCall[i] = struct { 90 result1 string 91 }{result1} 92 } 93 94 func (fake *FakeV3RestartAppInstanceActor) DeleteInstanceByApplicationNameSpaceProcessTypeAndIndex(arg1 string, arg2 string, arg3 string, arg4 int) (v3action.Warnings, error) { 95 fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.Lock() 96 ret, specificReturn := fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexReturnsOnCall[len(fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexArgsForCall)] 97 fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexArgsForCall = append(fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexArgsForCall, struct { 98 arg1 string 99 arg2 string 100 arg3 string 101 arg4 int 102 }{arg1, arg2, arg3, arg4}) 103 fake.recordInvocation("DeleteInstanceByApplicationNameSpaceProcessTypeAndIndex", []interface{}{arg1, arg2, arg3, arg4}) 104 fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.Unlock() 105 if fake.DeleteInstanceByApplicationNameSpaceProcessTypeAndIndexStub != nil { 106 return fake.DeleteInstanceByApplicationNameSpaceProcessTypeAndIndexStub(arg1, arg2, arg3, arg4) 107 } 108 if specificReturn { 109 return ret.result1, ret.result2 110 } 111 fakeReturns := fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexReturns 112 return fakeReturns.result1, fakeReturns.result2 113 } 114 115 func (fake *FakeV3RestartAppInstanceActor) DeleteInstanceByApplicationNameSpaceProcessTypeAndIndexCallCount() int { 116 fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.RLock() 117 defer fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.RUnlock() 118 return len(fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexArgsForCall) 119 } 120 121 func (fake *FakeV3RestartAppInstanceActor) DeleteInstanceByApplicationNameSpaceProcessTypeAndIndexCalls(stub func(string, string, string, int) (v3action.Warnings, error)) { 122 fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.Lock() 123 defer fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.Unlock() 124 fake.DeleteInstanceByApplicationNameSpaceProcessTypeAndIndexStub = stub 125 } 126 127 func (fake *FakeV3RestartAppInstanceActor) DeleteInstanceByApplicationNameSpaceProcessTypeAndIndexArgsForCall(i int) (string, string, string, int) { 128 fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.RLock() 129 defer fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.RUnlock() 130 argsForCall := fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexArgsForCall[i] 131 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 132 } 133 134 func (fake *FakeV3RestartAppInstanceActor) DeleteInstanceByApplicationNameSpaceProcessTypeAndIndexReturns(result1 v3action.Warnings, result2 error) { 135 fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.Lock() 136 defer fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.Unlock() 137 fake.DeleteInstanceByApplicationNameSpaceProcessTypeAndIndexStub = nil 138 fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexReturns = struct { 139 result1 v3action.Warnings 140 result2 error 141 }{result1, result2} 142 } 143 144 func (fake *FakeV3RestartAppInstanceActor) DeleteInstanceByApplicationNameSpaceProcessTypeAndIndexReturnsOnCall(i int, result1 v3action.Warnings, result2 error) { 145 fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.Lock() 146 defer fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.Unlock() 147 fake.DeleteInstanceByApplicationNameSpaceProcessTypeAndIndexStub = nil 148 if fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexReturnsOnCall == nil { 149 fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexReturnsOnCall = make(map[int]struct { 150 result1 v3action.Warnings 151 result2 error 152 }) 153 } 154 fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexReturnsOnCall[i] = struct { 155 result1 v3action.Warnings 156 result2 error 157 }{result1, result2} 158 } 159 160 func (fake *FakeV3RestartAppInstanceActor) Invocations() map[string][][]interface{} { 161 fake.invocationsMutex.RLock() 162 defer fake.invocationsMutex.RUnlock() 163 fake.cloudControllerAPIVersionMutex.RLock() 164 defer fake.cloudControllerAPIVersionMutex.RUnlock() 165 fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.RLock() 166 defer fake.deleteInstanceByApplicationNameSpaceProcessTypeAndIndexMutex.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 *FakeV3RestartAppInstanceActor) 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.V3RestartAppInstanceActor = new(FakeV3RestartAppInstanceActor)