github.com/dcarley/cf-cli@v6.24.1-0.20170220111324-4225ff346898+incompatible/command/v2/v2fakes/fake_set_health_check_actor.go (about) 1 // This file was generated by counterfeiter 2 package v2fakes 3 4 import ( 5 "sync" 6 7 "code.cloudfoundry.org/cli/actor/v2action" 8 "code.cloudfoundry.org/cli/command/v2" 9 ) 10 11 type FakeSetHealthCheckActor struct { 12 SetApplicationHealthCheckTypeByNameAndSpaceStub func(name string, spaceGUID string, healthCheckType string, httpEndpoint string) (v2action.Application, v2action.Warnings, error) 13 setApplicationHealthCheckTypeByNameAndSpaceMutex sync.RWMutex 14 setApplicationHealthCheckTypeByNameAndSpaceArgsForCall []struct { 15 name string 16 spaceGUID string 17 healthCheckType string 18 httpEndpoint string 19 } 20 setApplicationHealthCheckTypeByNameAndSpaceReturns struct { 21 result1 v2action.Application 22 result2 v2action.Warnings 23 result3 error 24 } 25 invocations map[string][][]interface{} 26 invocationsMutex sync.RWMutex 27 } 28 29 func (fake *FakeSetHealthCheckActor) SetApplicationHealthCheckTypeByNameAndSpace(name string, spaceGUID string, healthCheckType string, httpEndpoint string) (v2action.Application, v2action.Warnings, error) { 30 fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.Lock() 31 fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall = append(fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall, struct { 32 name string 33 spaceGUID string 34 healthCheckType string 35 httpEndpoint string 36 }{name, spaceGUID, healthCheckType, httpEndpoint}) 37 fake.recordInvocation("SetApplicationHealthCheckTypeByNameAndSpace", []interface{}{name, spaceGUID, healthCheckType, httpEndpoint}) 38 fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.Unlock() 39 if fake.SetApplicationHealthCheckTypeByNameAndSpaceStub != nil { 40 return fake.SetApplicationHealthCheckTypeByNameAndSpaceStub(name, spaceGUID, healthCheckType, httpEndpoint) 41 } else { 42 return fake.setApplicationHealthCheckTypeByNameAndSpaceReturns.result1, fake.setApplicationHealthCheckTypeByNameAndSpaceReturns.result2, fake.setApplicationHealthCheckTypeByNameAndSpaceReturns.result3 43 } 44 } 45 46 func (fake *FakeSetHealthCheckActor) SetApplicationHealthCheckTypeByNameAndSpaceCallCount() int { 47 fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.RLock() 48 defer fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.RUnlock() 49 return len(fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall) 50 } 51 52 func (fake *FakeSetHealthCheckActor) SetApplicationHealthCheckTypeByNameAndSpaceArgsForCall(i int) (string, string, string, string) { 53 fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.RLock() 54 defer fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.RUnlock() 55 return fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall[i].name, fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall[i].spaceGUID, fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall[i].healthCheckType, fake.setApplicationHealthCheckTypeByNameAndSpaceArgsForCall[i].httpEndpoint 56 } 57 58 func (fake *FakeSetHealthCheckActor) SetApplicationHealthCheckTypeByNameAndSpaceReturns(result1 v2action.Application, result2 v2action.Warnings, result3 error) { 59 fake.SetApplicationHealthCheckTypeByNameAndSpaceStub = nil 60 fake.setApplicationHealthCheckTypeByNameAndSpaceReturns = struct { 61 result1 v2action.Application 62 result2 v2action.Warnings 63 result3 error 64 }{result1, result2, result3} 65 } 66 67 func (fake *FakeSetHealthCheckActor) Invocations() map[string][][]interface{} { 68 fake.invocationsMutex.RLock() 69 defer fake.invocationsMutex.RUnlock() 70 fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.RLock() 71 defer fake.setApplicationHealthCheckTypeByNameAndSpaceMutex.RUnlock() 72 return fake.invocations 73 } 74 75 func (fake *FakeSetHealthCheckActor) recordInvocation(key string, args []interface{}) { 76 fake.invocationsMutex.Lock() 77 defer fake.invocationsMutex.Unlock() 78 if fake.invocations == nil { 79 fake.invocations = map[string][][]interface{}{} 80 } 81 if fake.invocations[key] == nil { 82 fake.invocations[key] = [][]interface{}{} 83 } 84 fake.invocations[key] = append(fake.invocations[key], args) 85 } 86 87 var _ v2.SetHealthCheckActor = new(FakeSetHealthCheckActor)