github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/command/v6/v6fakes/fake_create_route_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v6fakes 3 4 import ( 5 "sync" 6 7 "code.cloudfoundry.org/cli/actor/v2action" 8 v6 "code.cloudfoundry.org/cli/command/v6" 9 ) 10 11 type FakeCreateRouteActor struct { 12 CloudControllerAPIVersionStub func() string 13 cloudControllerAPIVersionMutex sync.RWMutex 14 cloudControllerAPIVersionArgsForCall []struct { 15 } 16 cloudControllerAPIVersionReturns struct { 17 result1 string 18 } 19 cloudControllerAPIVersionReturnsOnCall map[int]struct { 20 result1 string 21 } 22 CreateRouteWithExistenceCheckStub func(string, string, v2action.Route, bool) (v2action.Route, v2action.Warnings, error) 23 createRouteWithExistenceCheckMutex sync.RWMutex 24 createRouteWithExistenceCheckArgsForCall []struct { 25 arg1 string 26 arg2 string 27 arg3 v2action.Route 28 arg4 bool 29 } 30 createRouteWithExistenceCheckReturns struct { 31 result1 v2action.Route 32 result2 v2action.Warnings 33 result3 error 34 } 35 createRouteWithExistenceCheckReturnsOnCall map[int]struct { 36 result1 v2action.Route 37 result2 v2action.Warnings 38 result3 error 39 } 40 invocations map[string][][]interface{} 41 invocationsMutex sync.RWMutex 42 } 43 44 func (fake *FakeCreateRouteActor) CloudControllerAPIVersion() string { 45 fake.cloudControllerAPIVersionMutex.Lock() 46 ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)] 47 fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct { 48 }{}) 49 fake.recordInvocation("CloudControllerAPIVersion", []interface{}{}) 50 fake.cloudControllerAPIVersionMutex.Unlock() 51 if fake.CloudControllerAPIVersionStub != nil { 52 return fake.CloudControllerAPIVersionStub() 53 } 54 if specificReturn { 55 return ret.result1 56 } 57 fakeReturns := fake.cloudControllerAPIVersionReturns 58 return fakeReturns.result1 59 } 60 61 func (fake *FakeCreateRouteActor) CloudControllerAPIVersionCallCount() int { 62 fake.cloudControllerAPIVersionMutex.RLock() 63 defer fake.cloudControllerAPIVersionMutex.RUnlock() 64 return len(fake.cloudControllerAPIVersionArgsForCall) 65 } 66 67 func (fake *FakeCreateRouteActor) CloudControllerAPIVersionCalls(stub func() string) { 68 fake.cloudControllerAPIVersionMutex.Lock() 69 defer fake.cloudControllerAPIVersionMutex.Unlock() 70 fake.CloudControllerAPIVersionStub = stub 71 } 72 73 func (fake *FakeCreateRouteActor) CloudControllerAPIVersionReturns(result1 string) { 74 fake.cloudControllerAPIVersionMutex.Lock() 75 defer fake.cloudControllerAPIVersionMutex.Unlock() 76 fake.CloudControllerAPIVersionStub = nil 77 fake.cloudControllerAPIVersionReturns = struct { 78 result1 string 79 }{result1} 80 } 81 82 func (fake *FakeCreateRouteActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) { 83 fake.cloudControllerAPIVersionMutex.Lock() 84 defer fake.cloudControllerAPIVersionMutex.Unlock() 85 fake.CloudControllerAPIVersionStub = nil 86 if fake.cloudControllerAPIVersionReturnsOnCall == nil { 87 fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct { 88 result1 string 89 }) 90 } 91 fake.cloudControllerAPIVersionReturnsOnCall[i] = struct { 92 result1 string 93 }{result1} 94 } 95 96 func (fake *FakeCreateRouteActor) CreateRouteWithExistenceCheck(arg1 string, arg2 string, arg3 v2action.Route, arg4 bool) (v2action.Route, v2action.Warnings, error) { 97 fake.createRouteWithExistenceCheckMutex.Lock() 98 ret, specificReturn := fake.createRouteWithExistenceCheckReturnsOnCall[len(fake.createRouteWithExistenceCheckArgsForCall)] 99 fake.createRouteWithExistenceCheckArgsForCall = append(fake.createRouteWithExistenceCheckArgsForCall, struct { 100 arg1 string 101 arg2 string 102 arg3 v2action.Route 103 arg4 bool 104 }{arg1, arg2, arg3, arg4}) 105 fake.recordInvocation("CreateRouteWithExistenceCheck", []interface{}{arg1, arg2, arg3, arg4}) 106 fake.createRouteWithExistenceCheckMutex.Unlock() 107 if fake.CreateRouteWithExistenceCheckStub != nil { 108 return fake.CreateRouteWithExistenceCheckStub(arg1, arg2, arg3, arg4) 109 } 110 if specificReturn { 111 return ret.result1, ret.result2, ret.result3 112 } 113 fakeReturns := fake.createRouteWithExistenceCheckReturns 114 return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 115 } 116 117 func (fake *FakeCreateRouteActor) CreateRouteWithExistenceCheckCallCount() int { 118 fake.createRouteWithExistenceCheckMutex.RLock() 119 defer fake.createRouteWithExistenceCheckMutex.RUnlock() 120 return len(fake.createRouteWithExistenceCheckArgsForCall) 121 } 122 123 func (fake *FakeCreateRouteActor) CreateRouteWithExistenceCheckCalls(stub func(string, string, v2action.Route, bool) (v2action.Route, v2action.Warnings, error)) { 124 fake.createRouteWithExistenceCheckMutex.Lock() 125 defer fake.createRouteWithExistenceCheckMutex.Unlock() 126 fake.CreateRouteWithExistenceCheckStub = stub 127 } 128 129 func (fake *FakeCreateRouteActor) CreateRouteWithExistenceCheckArgsForCall(i int) (string, string, v2action.Route, bool) { 130 fake.createRouteWithExistenceCheckMutex.RLock() 131 defer fake.createRouteWithExistenceCheckMutex.RUnlock() 132 argsForCall := fake.createRouteWithExistenceCheckArgsForCall[i] 133 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 134 } 135 136 func (fake *FakeCreateRouteActor) CreateRouteWithExistenceCheckReturns(result1 v2action.Route, result2 v2action.Warnings, result3 error) { 137 fake.createRouteWithExistenceCheckMutex.Lock() 138 defer fake.createRouteWithExistenceCheckMutex.Unlock() 139 fake.CreateRouteWithExistenceCheckStub = nil 140 fake.createRouteWithExistenceCheckReturns = struct { 141 result1 v2action.Route 142 result2 v2action.Warnings 143 result3 error 144 }{result1, result2, result3} 145 } 146 147 func (fake *FakeCreateRouteActor) CreateRouteWithExistenceCheckReturnsOnCall(i int, result1 v2action.Route, result2 v2action.Warnings, result3 error) { 148 fake.createRouteWithExistenceCheckMutex.Lock() 149 defer fake.createRouteWithExistenceCheckMutex.Unlock() 150 fake.CreateRouteWithExistenceCheckStub = nil 151 if fake.createRouteWithExistenceCheckReturnsOnCall == nil { 152 fake.createRouteWithExistenceCheckReturnsOnCall = make(map[int]struct { 153 result1 v2action.Route 154 result2 v2action.Warnings 155 result3 error 156 }) 157 } 158 fake.createRouteWithExistenceCheckReturnsOnCall[i] = struct { 159 result1 v2action.Route 160 result2 v2action.Warnings 161 result3 error 162 }{result1, result2, result3} 163 } 164 165 func (fake *FakeCreateRouteActor) Invocations() map[string][][]interface{} { 166 fake.invocationsMutex.RLock() 167 defer fake.invocationsMutex.RUnlock() 168 fake.cloudControllerAPIVersionMutex.RLock() 169 defer fake.cloudControllerAPIVersionMutex.RUnlock() 170 fake.createRouteWithExistenceCheckMutex.RLock() 171 defer fake.createRouteWithExistenceCheckMutex.RUnlock() 172 copiedInvocations := map[string][][]interface{}{} 173 for key, value := range fake.invocations { 174 copiedInvocations[key] = value 175 } 176 return copiedInvocations 177 } 178 179 func (fake *FakeCreateRouteActor) recordInvocation(key string, args []interface{}) { 180 fake.invocationsMutex.Lock() 181 defer fake.invocationsMutex.Unlock() 182 if fake.invocations == nil { 183 fake.invocations = map[string][][]interface{}{} 184 } 185 if fake.invocations[key] == nil { 186 fake.invocations[key] = [][]interface{}{} 187 } 188 fake.invocations[key] = append(fake.invocations[key], args) 189 } 190 191 var _ v6.CreateRouteActor = new(FakeCreateRouteActor)