github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/command/v7/v7fakes/fake_check_route_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v7fakes 3 4 import ( 5 "sync" 6 7 "code.cloudfoundry.org/cli/actor/v7action" 8 v7 "code.cloudfoundry.org/cli/command/v7" 9 ) 10 11 type FakeCheckRouteActor struct { 12 CheckRouteStub func(string, string, string) (bool, v7action.Warnings, error) 13 checkRouteMutex sync.RWMutex 14 checkRouteArgsForCall []struct { 15 arg1 string 16 arg2 string 17 arg3 string 18 } 19 checkRouteReturns struct { 20 result1 bool 21 result2 v7action.Warnings 22 result3 error 23 } 24 checkRouteReturnsOnCall map[int]struct { 25 result1 bool 26 result2 v7action.Warnings 27 result3 error 28 } 29 invocations map[string][][]interface{} 30 invocationsMutex sync.RWMutex 31 } 32 33 func (fake *FakeCheckRouteActor) CheckRoute(arg1 string, arg2 string, arg3 string) (bool, v7action.Warnings, error) { 34 fake.checkRouteMutex.Lock() 35 ret, specificReturn := fake.checkRouteReturnsOnCall[len(fake.checkRouteArgsForCall)] 36 fake.checkRouteArgsForCall = append(fake.checkRouteArgsForCall, struct { 37 arg1 string 38 arg2 string 39 arg3 string 40 }{arg1, arg2, arg3}) 41 fake.recordInvocation("CheckRoute", []interface{}{arg1, arg2, arg3}) 42 fake.checkRouteMutex.Unlock() 43 if fake.CheckRouteStub != nil { 44 return fake.CheckRouteStub(arg1, arg2, arg3) 45 } 46 if specificReturn { 47 return ret.result1, ret.result2, ret.result3 48 } 49 fakeReturns := fake.checkRouteReturns 50 return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 51 } 52 53 func (fake *FakeCheckRouteActor) CheckRouteCallCount() int { 54 fake.checkRouteMutex.RLock() 55 defer fake.checkRouteMutex.RUnlock() 56 return len(fake.checkRouteArgsForCall) 57 } 58 59 func (fake *FakeCheckRouteActor) CheckRouteCalls(stub func(string, string, string) (bool, v7action.Warnings, error)) { 60 fake.checkRouteMutex.Lock() 61 defer fake.checkRouteMutex.Unlock() 62 fake.CheckRouteStub = stub 63 } 64 65 func (fake *FakeCheckRouteActor) CheckRouteArgsForCall(i int) (string, string, string) { 66 fake.checkRouteMutex.RLock() 67 defer fake.checkRouteMutex.RUnlock() 68 argsForCall := fake.checkRouteArgsForCall[i] 69 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 70 } 71 72 func (fake *FakeCheckRouteActor) CheckRouteReturns(result1 bool, result2 v7action.Warnings, result3 error) { 73 fake.checkRouteMutex.Lock() 74 defer fake.checkRouteMutex.Unlock() 75 fake.CheckRouteStub = nil 76 fake.checkRouteReturns = struct { 77 result1 bool 78 result2 v7action.Warnings 79 result3 error 80 }{result1, result2, result3} 81 } 82 83 func (fake *FakeCheckRouteActor) CheckRouteReturnsOnCall(i int, result1 bool, result2 v7action.Warnings, result3 error) { 84 fake.checkRouteMutex.Lock() 85 defer fake.checkRouteMutex.Unlock() 86 fake.CheckRouteStub = nil 87 if fake.checkRouteReturnsOnCall == nil { 88 fake.checkRouteReturnsOnCall = make(map[int]struct { 89 result1 bool 90 result2 v7action.Warnings 91 result3 error 92 }) 93 } 94 fake.checkRouteReturnsOnCall[i] = struct { 95 result1 bool 96 result2 v7action.Warnings 97 result3 error 98 }{result1, result2, result3} 99 } 100 101 func (fake *FakeCheckRouteActor) Invocations() map[string][][]interface{} { 102 fake.invocationsMutex.RLock() 103 defer fake.invocationsMutex.RUnlock() 104 fake.checkRouteMutex.RLock() 105 defer fake.checkRouteMutex.RUnlock() 106 copiedInvocations := map[string][][]interface{}{} 107 for key, value := range fake.invocations { 108 copiedInvocations[key] = value 109 } 110 return copiedInvocations 111 } 112 113 func (fake *FakeCheckRouteActor) recordInvocation(key string, args []interface{}) { 114 fake.invocationsMutex.Lock() 115 defer fake.invocationsMutex.Unlock() 116 if fake.invocations == nil { 117 fake.invocations = map[string][][]interface{}{} 118 } 119 if fake.invocations[key] == nil { 120 fake.invocations[key] = [][]interface{}{} 121 } 122 fake.invocations[key] = append(fake.invocations[key], args) 123 } 124 125 var _ v7.CheckRouteActor = new(FakeCheckRouteActor)