github.com/nimakaviani/cli@v6.37.1-0.20180619223813-e734901a73fa+incompatible/command/v3/v3fakes/fake_original_v2push_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v3fakes 3 4 import ( 5 "sync" 6 7 "code.cloudfoundry.org/cli/actor/pushaction" 8 "code.cloudfoundry.org/cli/actor/v2action" 9 "code.cloudfoundry.org/cli/command/v3" 10 ) 11 12 type FakeOriginalV2PushActor struct { 13 CreateAndMapDefaultApplicationRouteStub func(orgGUID string, spaceGUID string, app v2action.Application) (pushaction.Warnings, error) 14 createAndMapDefaultApplicationRouteMutex sync.RWMutex 15 createAndMapDefaultApplicationRouteArgsForCall []struct { 16 orgGUID string 17 spaceGUID string 18 app v2action.Application 19 } 20 createAndMapDefaultApplicationRouteReturns struct { 21 result1 pushaction.Warnings 22 result2 error 23 } 24 createAndMapDefaultApplicationRouteReturnsOnCall map[int]struct { 25 result1 pushaction.Warnings 26 result2 error 27 } 28 invocations map[string][][]interface{} 29 invocationsMutex sync.RWMutex 30 } 31 32 func (fake *FakeOriginalV2PushActor) CreateAndMapDefaultApplicationRoute(orgGUID string, spaceGUID string, app v2action.Application) (pushaction.Warnings, error) { 33 fake.createAndMapDefaultApplicationRouteMutex.Lock() 34 ret, specificReturn := fake.createAndMapDefaultApplicationRouteReturnsOnCall[len(fake.createAndMapDefaultApplicationRouteArgsForCall)] 35 fake.createAndMapDefaultApplicationRouteArgsForCall = append(fake.createAndMapDefaultApplicationRouteArgsForCall, struct { 36 orgGUID string 37 spaceGUID string 38 app v2action.Application 39 }{orgGUID, spaceGUID, app}) 40 fake.recordInvocation("CreateAndMapDefaultApplicationRoute", []interface{}{orgGUID, spaceGUID, app}) 41 fake.createAndMapDefaultApplicationRouteMutex.Unlock() 42 if fake.CreateAndMapDefaultApplicationRouteStub != nil { 43 return fake.CreateAndMapDefaultApplicationRouteStub(orgGUID, spaceGUID, app) 44 } 45 if specificReturn { 46 return ret.result1, ret.result2 47 } 48 return fake.createAndMapDefaultApplicationRouteReturns.result1, fake.createAndMapDefaultApplicationRouteReturns.result2 49 } 50 51 func (fake *FakeOriginalV2PushActor) CreateAndMapDefaultApplicationRouteCallCount() int { 52 fake.createAndMapDefaultApplicationRouteMutex.RLock() 53 defer fake.createAndMapDefaultApplicationRouteMutex.RUnlock() 54 return len(fake.createAndMapDefaultApplicationRouteArgsForCall) 55 } 56 57 func (fake *FakeOriginalV2PushActor) CreateAndMapDefaultApplicationRouteArgsForCall(i int) (string, string, v2action.Application) { 58 fake.createAndMapDefaultApplicationRouteMutex.RLock() 59 defer fake.createAndMapDefaultApplicationRouteMutex.RUnlock() 60 return fake.createAndMapDefaultApplicationRouteArgsForCall[i].orgGUID, fake.createAndMapDefaultApplicationRouteArgsForCall[i].spaceGUID, fake.createAndMapDefaultApplicationRouteArgsForCall[i].app 61 } 62 63 func (fake *FakeOriginalV2PushActor) CreateAndMapDefaultApplicationRouteReturns(result1 pushaction.Warnings, result2 error) { 64 fake.CreateAndMapDefaultApplicationRouteStub = nil 65 fake.createAndMapDefaultApplicationRouteReturns = struct { 66 result1 pushaction.Warnings 67 result2 error 68 }{result1, result2} 69 } 70 71 func (fake *FakeOriginalV2PushActor) CreateAndMapDefaultApplicationRouteReturnsOnCall(i int, result1 pushaction.Warnings, result2 error) { 72 fake.CreateAndMapDefaultApplicationRouteStub = nil 73 if fake.createAndMapDefaultApplicationRouteReturnsOnCall == nil { 74 fake.createAndMapDefaultApplicationRouteReturnsOnCall = make(map[int]struct { 75 result1 pushaction.Warnings 76 result2 error 77 }) 78 } 79 fake.createAndMapDefaultApplicationRouteReturnsOnCall[i] = struct { 80 result1 pushaction.Warnings 81 result2 error 82 }{result1, result2} 83 } 84 85 func (fake *FakeOriginalV2PushActor) Invocations() map[string][][]interface{} { 86 fake.invocationsMutex.RLock() 87 defer fake.invocationsMutex.RUnlock() 88 fake.createAndMapDefaultApplicationRouteMutex.RLock() 89 defer fake.createAndMapDefaultApplicationRouteMutex.RUnlock() 90 copiedInvocations := map[string][][]interface{}{} 91 for key, value := range fake.invocations { 92 copiedInvocations[key] = value 93 } 94 return copiedInvocations 95 } 96 97 func (fake *FakeOriginalV2PushActor) recordInvocation(key string, args []interface{}) { 98 fake.invocationsMutex.Lock() 99 defer fake.invocationsMutex.Unlock() 100 if fake.invocations == nil { 101 fake.invocations = map[string][][]interface{}{} 102 } 103 if fake.invocations[key] == nil { 104 fake.invocations[key] = [][]interface{}{} 105 } 106 fake.invocations[key] = append(fake.invocations[key], args) 107 } 108 109 var _ v3.OriginalV2PushActor = new(FakeOriginalV2PushActor)