github.com/jenspinney/cli@v6.42.1-0.20190207184520-7450c600020e+incompatible/command/v7/v7fakes/fake_set_health_check_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 constant "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" 9 v7 "code.cloudfoundry.org/cli/command/v7" 10 ) 11 12 type FakeSetHealthCheckActor struct { 13 CloudControllerAPIVersionStub func() string 14 cloudControllerAPIVersionMutex sync.RWMutex 15 cloudControllerAPIVersionArgsForCall []struct { 16 } 17 cloudControllerAPIVersionReturns struct { 18 result1 string 19 } 20 cloudControllerAPIVersionReturnsOnCall map[int]struct { 21 result1 string 22 } 23 SetApplicationProcessHealthCheckTypeByNameAndSpaceStub func(string, string, constant.HealthCheckType, string, string, int64) (v7action.Application, v7action.Warnings, error) 24 setApplicationProcessHealthCheckTypeByNameAndSpaceMutex sync.RWMutex 25 setApplicationProcessHealthCheckTypeByNameAndSpaceArgsForCall []struct { 26 arg1 string 27 arg2 string 28 arg3 constant.HealthCheckType 29 arg4 string 30 arg5 string 31 arg6 int64 32 } 33 setApplicationProcessHealthCheckTypeByNameAndSpaceReturns struct { 34 result1 v7action.Application 35 result2 v7action.Warnings 36 result3 error 37 } 38 setApplicationProcessHealthCheckTypeByNameAndSpaceReturnsOnCall map[int]struct { 39 result1 v7action.Application 40 result2 v7action.Warnings 41 result3 error 42 } 43 invocations map[string][][]interface{} 44 invocationsMutex sync.RWMutex 45 } 46 47 func (fake *FakeSetHealthCheckActor) CloudControllerAPIVersion() string { 48 fake.cloudControllerAPIVersionMutex.Lock() 49 ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)] 50 fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct { 51 }{}) 52 fake.recordInvocation("CloudControllerAPIVersion", []interface{}{}) 53 fake.cloudControllerAPIVersionMutex.Unlock() 54 if fake.CloudControllerAPIVersionStub != nil { 55 return fake.CloudControllerAPIVersionStub() 56 } 57 if specificReturn { 58 return ret.result1 59 } 60 fakeReturns := fake.cloudControllerAPIVersionReturns 61 return fakeReturns.result1 62 } 63 64 func (fake *FakeSetHealthCheckActor) CloudControllerAPIVersionCallCount() int { 65 fake.cloudControllerAPIVersionMutex.RLock() 66 defer fake.cloudControllerAPIVersionMutex.RUnlock() 67 return len(fake.cloudControllerAPIVersionArgsForCall) 68 } 69 70 func (fake *FakeSetHealthCheckActor) CloudControllerAPIVersionCalls(stub func() string) { 71 fake.cloudControllerAPIVersionMutex.Lock() 72 defer fake.cloudControllerAPIVersionMutex.Unlock() 73 fake.CloudControllerAPIVersionStub = stub 74 } 75 76 func (fake *FakeSetHealthCheckActor) CloudControllerAPIVersionReturns(result1 string) { 77 fake.cloudControllerAPIVersionMutex.Lock() 78 defer fake.cloudControllerAPIVersionMutex.Unlock() 79 fake.CloudControllerAPIVersionStub = nil 80 fake.cloudControllerAPIVersionReturns = struct { 81 result1 string 82 }{result1} 83 } 84 85 func (fake *FakeSetHealthCheckActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) { 86 fake.cloudControllerAPIVersionMutex.Lock() 87 defer fake.cloudControllerAPIVersionMutex.Unlock() 88 fake.CloudControllerAPIVersionStub = nil 89 if fake.cloudControllerAPIVersionReturnsOnCall == nil { 90 fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct { 91 result1 string 92 }) 93 } 94 fake.cloudControllerAPIVersionReturnsOnCall[i] = struct { 95 result1 string 96 }{result1} 97 } 98 99 func (fake *FakeSetHealthCheckActor) SetApplicationProcessHealthCheckTypeByNameAndSpace(arg1 string, arg2 string, arg3 constant.HealthCheckType, arg4 string, arg5 string, arg6 int64) (v7action.Application, v7action.Warnings, error) { 100 fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.Lock() 101 ret, specificReturn := fake.setApplicationProcessHealthCheckTypeByNameAndSpaceReturnsOnCall[len(fake.setApplicationProcessHealthCheckTypeByNameAndSpaceArgsForCall)] 102 fake.setApplicationProcessHealthCheckTypeByNameAndSpaceArgsForCall = append(fake.setApplicationProcessHealthCheckTypeByNameAndSpaceArgsForCall, struct { 103 arg1 string 104 arg2 string 105 arg3 constant.HealthCheckType 106 arg4 string 107 arg5 string 108 arg6 int64 109 }{arg1, arg2, arg3, arg4, arg5, arg6}) 110 fake.recordInvocation("SetApplicationProcessHealthCheckTypeByNameAndSpace", []interface{}{arg1, arg2, arg3, arg4, arg5, arg6}) 111 fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.Unlock() 112 if fake.SetApplicationProcessHealthCheckTypeByNameAndSpaceStub != nil { 113 return fake.SetApplicationProcessHealthCheckTypeByNameAndSpaceStub(arg1, arg2, arg3, arg4, arg5, arg6) 114 } 115 if specificReturn { 116 return ret.result1, ret.result2, ret.result3 117 } 118 fakeReturns := fake.setApplicationProcessHealthCheckTypeByNameAndSpaceReturns 119 return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 120 } 121 122 func (fake *FakeSetHealthCheckActor) SetApplicationProcessHealthCheckTypeByNameAndSpaceCallCount() int { 123 fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.RLock() 124 defer fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.RUnlock() 125 return len(fake.setApplicationProcessHealthCheckTypeByNameAndSpaceArgsForCall) 126 } 127 128 func (fake *FakeSetHealthCheckActor) SetApplicationProcessHealthCheckTypeByNameAndSpaceCalls(stub func(string, string, constant.HealthCheckType, string, string, int64) (v7action.Application, v7action.Warnings, error)) { 129 fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.Lock() 130 defer fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.Unlock() 131 fake.SetApplicationProcessHealthCheckTypeByNameAndSpaceStub = stub 132 } 133 134 func (fake *FakeSetHealthCheckActor) SetApplicationProcessHealthCheckTypeByNameAndSpaceArgsForCall(i int) (string, string, constant.HealthCheckType, string, string, int64) { 135 fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.RLock() 136 defer fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.RUnlock() 137 argsForCall := fake.setApplicationProcessHealthCheckTypeByNameAndSpaceArgsForCall[i] 138 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5, argsForCall.arg6 139 } 140 141 func (fake *FakeSetHealthCheckActor) SetApplicationProcessHealthCheckTypeByNameAndSpaceReturns(result1 v7action.Application, result2 v7action.Warnings, result3 error) { 142 fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.Lock() 143 defer fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.Unlock() 144 fake.SetApplicationProcessHealthCheckTypeByNameAndSpaceStub = nil 145 fake.setApplicationProcessHealthCheckTypeByNameAndSpaceReturns = struct { 146 result1 v7action.Application 147 result2 v7action.Warnings 148 result3 error 149 }{result1, result2, result3} 150 } 151 152 func (fake *FakeSetHealthCheckActor) SetApplicationProcessHealthCheckTypeByNameAndSpaceReturnsOnCall(i int, result1 v7action.Application, result2 v7action.Warnings, result3 error) { 153 fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.Lock() 154 defer fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.Unlock() 155 fake.SetApplicationProcessHealthCheckTypeByNameAndSpaceStub = nil 156 if fake.setApplicationProcessHealthCheckTypeByNameAndSpaceReturnsOnCall == nil { 157 fake.setApplicationProcessHealthCheckTypeByNameAndSpaceReturnsOnCall = make(map[int]struct { 158 result1 v7action.Application 159 result2 v7action.Warnings 160 result3 error 161 }) 162 } 163 fake.setApplicationProcessHealthCheckTypeByNameAndSpaceReturnsOnCall[i] = struct { 164 result1 v7action.Application 165 result2 v7action.Warnings 166 result3 error 167 }{result1, result2, result3} 168 } 169 170 func (fake *FakeSetHealthCheckActor) Invocations() map[string][][]interface{} { 171 fake.invocationsMutex.RLock() 172 defer fake.invocationsMutex.RUnlock() 173 fake.cloudControllerAPIVersionMutex.RLock() 174 defer fake.cloudControllerAPIVersionMutex.RUnlock() 175 fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.RLock() 176 defer fake.setApplicationProcessHealthCheckTypeByNameAndSpaceMutex.RUnlock() 177 copiedInvocations := map[string][][]interface{}{} 178 for key, value := range fake.invocations { 179 copiedInvocations[key] = value 180 } 181 return copiedInvocations 182 } 183 184 func (fake *FakeSetHealthCheckActor) recordInvocation(key string, args []interface{}) { 185 fake.invocationsMutex.Lock() 186 defer fake.invocationsMutex.Unlock() 187 if fake.invocations == nil { 188 fake.invocations = map[string][][]interface{}{} 189 } 190 if fake.invocations[key] == nil { 191 fake.invocations[key] = [][]interface{}{} 192 } 193 fake.invocations[key] = append(fake.invocations[key], args) 194 } 195 196 var _ v7.SetHealthCheckActor = new(FakeSetHealthCheckActor)