github.com/liamawhite/cli-with-i18n@v6.32.1-0.20171122084555-dede0a5c3448+incompatible/command/v2/v2fakes/fake_set_health_check_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v2fakes 3 4 import ( 5 "sync" 6 7 "github.com/liamawhite/cli-with-i18n/actor/v2action" 8 "github.com/liamawhite/cli-with-i18n/command/v2" 9 ) 10 11 type FakeSetHealthCheckActor struct { 12 SetApplicationHealthCheckTypeByNameAndSpaceStub func(name string, spaceGUID string, healthCheckType v2action.ApplicationHealthCheckType, httpEndpoint string) (v2action.Application, v2action.Warnings, error) 13 setApplicationHealthCheckTypeByNameAndSpaceMutex sync.RWMutex 14 setApplicationHealthCheckTypeByNameAndSpaceArgsForCall []struct { 15 name string 16 spaceGUID string 17 healthCheckType v2action.ApplicationHealthCheckType 18 httpEndpoint string 19 } 20 setApplicationHealthCheckTypeByNameAndSpaceReturns struct { 21 result1 v2action.Application 22 result2 v2action.Warnings 23 result3 error 24 } 25 setApplicationHealthCheckTypeByNameAndSpaceReturnsOnCall map[int]struct { 26 result1 v2action.Application 27 result2 v2action.Warnings 28 result3 error 29 } 30 CloudControllerAPIVersionStub func() string 31 cloudControllerAPIVersionMutex sync.RWMutex 32 cloudControllerAPIVersionArgsForCall []struct{} 33 cloudControllerAPIVersionReturns struct { 34 result1 string 35 } 36 cloudControllerAPIVersionReturnsOnCall map[int]struct { 37 result1 string 38 } 39 invocations map[string][][]interface{} 40 invocationsMutex sync.RWMutex 41 } 42 43 func (fake *FakeSetHealthCheckActor) SetApplicationHealthCheckTypeByNameAndSpace(name string, spaceGUID string, healthCheckType v2action.ApplicationHealthCheckType, httpEndpoint string) (v2action.Application, v2action.Warnings, error) { 44 fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.Lock() 45 ret, specificReturn := fake.setApplicationHealthCheckTypeByNameAndSpaceReturnsOnCall[len(fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall)] 46 fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall = append(fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall, struct { 47 name string 48 spaceGUID string 49 healthCheckType v2action.ApplicationHealthCheckType 50 httpEndpoint string 51 }{name, spaceGUID, healthCheckType, httpEndpoint}) 52 fake.recordInvocation("SetApplicationHealthCheckTypeByNameAndSpace", []interface{}{name, spaceGUID, healthCheckType, httpEndpoint}) 53 fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.Unlock() 54 if fake.SetApplicationHealthCheckTypeByNameAndSpaceStub != nil { 55 return fake.SetApplicationHealthCheckTypeByNameAndSpaceStub(name, spaceGUID, healthCheckType, httpEndpoint) 56 } 57 if specificReturn { 58 return ret.result1, ret.result2, ret.result3 59 } 60 return fake.setApplicationHealthCheckTypeByNameAndSpaceReturns.result1, fake.setApplicationHealthCheckTypeByNameAndSpaceReturns.result2, fake.setApplicationHealthCheckTypeByNameAndSpaceReturns.result3 61 } 62 63 func (fake *FakeSetHealthCheckActor) SetApplicationHealthCheckTypeByNameAndSpaceCallCount() int { 64 fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.RLock() 65 defer fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.RUnlock() 66 return len(fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall) 67 } 68 69 func (fake *FakeSetHealthCheckActor) SetApplicationHealthCheckTypeByNameAndSpaceArgsForCall(i int) (string, string, v2action.ApplicationHealthCheckType, string) { 70 fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.RLock() 71 defer fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.RUnlock() 72 return fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall[i].name, fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall[i].spaceGUID, fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall[i].healthCheckType, fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall[i].httpEndpoint 73 } 74 75 func (fake *FakeSetHealthCheckActor) SetApplicationHealthCheckTypeByNameAndSpaceReturns(result1 v2action.Application, result2 v2action.Warnings, result3 error) { 76 fake.SetApplicationHealthCheckTypeByNameAndSpaceStub = nil 77 fake.setApplicationHealthCheckTypeByNameAndSpaceReturns = struct { 78 result1 v2action.Application 79 result2 v2action.Warnings 80 result3 error 81 }{result1, result2, result3} 82 } 83 84 func (fake *FakeSetHealthCheckActor) SetApplicationHealthCheckTypeByNameAndSpaceReturnsOnCall(i int, result1 v2action.Application, result2 v2action.Warnings, result3 error) { 85 fake.SetApplicationHealthCheckTypeByNameAndSpaceStub = nil 86 if fake.setApplicationHealthCheckTypeByNameAndSpaceReturnsOnCall == nil { 87 fake.setApplicationHealthCheckTypeByNameAndSpaceReturnsOnCall = make(map[int]struct { 88 result1 v2action.Application 89 result2 v2action.Warnings 90 result3 error 91 }) 92 } 93 fake.setApplicationHealthCheckTypeByNameAndSpaceReturnsOnCall[i] = struct { 94 result1 v2action.Application 95 result2 v2action.Warnings 96 result3 error 97 }{result1, result2, result3} 98 } 99 100 func (fake *FakeSetHealthCheckActor) CloudControllerAPIVersion() string { 101 fake.cloudControllerAPIVersionMutex.Lock() 102 ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)] 103 fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct{}{}) 104 fake.recordInvocation("CloudControllerAPIVersion", []interface{}{}) 105 fake.cloudControllerAPIVersionMutex.Unlock() 106 if fake.CloudControllerAPIVersionStub != nil { 107 return fake.CloudControllerAPIVersionStub() 108 } 109 if specificReturn { 110 return ret.result1 111 } 112 return fake.cloudControllerAPIVersionReturns.result1 113 } 114 115 func (fake *FakeSetHealthCheckActor) CloudControllerAPIVersionCallCount() int { 116 fake.cloudControllerAPIVersionMutex.RLock() 117 defer fake.cloudControllerAPIVersionMutex.RUnlock() 118 return len(fake.cloudControllerAPIVersionArgsForCall) 119 } 120 121 func (fake *FakeSetHealthCheckActor) CloudControllerAPIVersionReturns(result1 string) { 122 fake.CloudControllerAPIVersionStub = nil 123 fake.cloudControllerAPIVersionReturns = struct { 124 result1 string 125 }{result1} 126 } 127 128 func (fake *FakeSetHealthCheckActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) { 129 fake.CloudControllerAPIVersionStub = nil 130 if fake.cloudControllerAPIVersionReturnsOnCall == nil { 131 fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct { 132 result1 string 133 }) 134 } 135 fake.cloudControllerAPIVersionReturnsOnCall[i] = struct { 136 result1 string 137 }{result1} 138 } 139 140 func (fake *FakeSetHealthCheckActor) Invocations() map[string][][]interface{} { 141 fake.invocationsMutex.RLock() 142 defer fake.invocationsMutex.RUnlock() 143 fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.RLock() 144 defer fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.RUnlock() 145 fake.cloudControllerAPIVersionMutex.RLock() 146 defer fake.cloudControllerAPIVersionMutex.RUnlock() 147 copiedInvocations := map[string][][]interface{}{} 148 for key, value := range fake.invocations { 149 copiedInvocations[key] = value 150 } 151 return copiedInvocations 152 } 153 154 func (fake *FakeSetHealthCheckActor) recordInvocation(key string, args []interface{}) { 155 fake.invocationsMutex.Lock() 156 defer fake.invocationsMutex.Unlock() 157 if fake.invocations == nil { 158 fake.invocations = map[string][][]interface{}{} 159 } 160 if fake.invocations[key] == nil { 161 fake.invocations[key] = [][]interface{}{} 162 } 163 fake.invocations[key] = append(fake.invocations[key], args) 164 } 165 166 var _ v2.SetHealthCheckActor = new(FakeSetHealthCheckActor)