github.com/willmadison/cli@v6.40.1-0.20181018160101-29d5937903ff+incompatible/command/v6/v6fakes/fake_delete_isolation_segment_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v6fakes 3 4 import ( 5 sync "sync" 6 7 v3action "code.cloudfoundry.org/cli/actor/v3action" 8 v6 "code.cloudfoundry.org/cli/command/v6" 9 ) 10 11 type FakeDeleteIsolationSegmentActor 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 DeleteIsolationSegmentByNameStub func(string) (v3action.Warnings, error) 23 deleteIsolationSegmentByNameMutex sync.RWMutex 24 deleteIsolationSegmentByNameArgsForCall []struct { 25 arg1 string 26 } 27 deleteIsolationSegmentByNameReturns struct { 28 result1 v3action.Warnings 29 result2 error 30 } 31 deleteIsolationSegmentByNameReturnsOnCall map[int]struct { 32 result1 v3action.Warnings 33 result2 error 34 } 35 invocations map[string][][]interface{} 36 invocationsMutex sync.RWMutex 37 } 38 39 func (fake *FakeDeleteIsolationSegmentActor) CloudControllerAPIVersion() string { 40 fake.cloudControllerAPIVersionMutex.Lock() 41 ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)] 42 fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct { 43 }{}) 44 fake.recordInvocation("CloudControllerAPIVersion", []interface{}{}) 45 fake.cloudControllerAPIVersionMutex.Unlock() 46 if fake.CloudControllerAPIVersionStub != nil { 47 return fake.CloudControllerAPIVersionStub() 48 } 49 if specificReturn { 50 return ret.result1 51 } 52 fakeReturns := fake.cloudControllerAPIVersionReturns 53 return fakeReturns.result1 54 } 55 56 func (fake *FakeDeleteIsolationSegmentActor) CloudControllerAPIVersionCallCount() int { 57 fake.cloudControllerAPIVersionMutex.RLock() 58 defer fake.cloudControllerAPIVersionMutex.RUnlock() 59 return len(fake.cloudControllerAPIVersionArgsForCall) 60 } 61 62 func (fake *FakeDeleteIsolationSegmentActor) CloudControllerAPIVersionCalls(stub func() string) { 63 fake.cloudControllerAPIVersionMutex.Lock() 64 defer fake.cloudControllerAPIVersionMutex.Unlock() 65 fake.CloudControllerAPIVersionStub = stub 66 } 67 68 func (fake *FakeDeleteIsolationSegmentActor) CloudControllerAPIVersionReturns(result1 string) { 69 fake.cloudControllerAPIVersionMutex.Lock() 70 defer fake.cloudControllerAPIVersionMutex.Unlock() 71 fake.CloudControllerAPIVersionStub = nil 72 fake.cloudControllerAPIVersionReturns = struct { 73 result1 string 74 }{result1} 75 } 76 77 func (fake *FakeDeleteIsolationSegmentActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) { 78 fake.cloudControllerAPIVersionMutex.Lock() 79 defer fake.cloudControllerAPIVersionMutex.Unlock() 80 fake.CloudControllerAPIVersionStub = nil 81 if fake.cloudControllerAPIVersionReturnsOnCall == nil { 82 fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct { 83 result1 string 84 }) 85 } 86 fake.cloudControllerAPIVersionReturnsOnCall[i] = struct { 87 result1 string 88 }{result1} 89 } 90 91 func (fake *FakeDeleteIsolationSegmentActor) DeleteIsolationSegmentByName(arg1 string) (v3action.Warnings, error) { 92 fake.deleteIsolationSegmentByNameMutex.Lock() 93 ret, specificReturn := fake.deleteIsolationSegmentByNameReturnsOnCall[len(fake.deleteIsolationSegmentByNameArgsForCall)] 94 fake.deleteIsolationSegmentByNameArgsForCall = append(fake.deleteIsolationSegmentByNameArgsForCall, struct { 95 arg1 string 96 }{arg1}) 97 fake.recordInvocation("DeleteIsolationSegmentByName", []interface{}{arg1}) 98 fake.deleteIsolationSegmentByNameMutex.Unlock() 99 if fake.DeleteIsolationSegmentByNameStub != nil { 100 return fake.DeleteIsolationSegmentByNameStub(arg1) 101 } 102 if specificReturn { 103 return ret.result1, ret.result2 104 } 105 fakeReturns := fake.deleteIsolationSegmentByNameReturns 106 return fakeReturns.result1, fakeReturns.result2 107 } 108 109 func (fake *FakeDeleteIsolationSegmentActor) DeleteIsolationSegmentByNameCallCount() int { 110 fake.deleteIsolationSegmentByNameMutex.RLock() 111 defer fake.deleteIsolationSegmentByNameMutex.RUnlock() 112 return len(fake.deleteIsolationSegmentByNameArgsForCall) 113 } 114 115 func (fake *FakeDeleteIsolationSegmentActor) DeleteIsolationSegmentByNameCalls(stub func(string) (v3action.Warnings, error)) { 116 fake.deleteIsolationSegmentByNameMutex.Lock() 117 defer fake.deleteIsolationSegmentByNameMutex.Unlock() 118 fake.DeleteIsolationSegmentByNameStub = stub 119 } 120 121 func (fake *FakeDeleteIsolationSegmentActor) DeleteIsolationSegmentByNameArgsForCall(i int) string { 122 fake.deleteIsolationSegmentByNameMutex.RLock() 123 defer fake.deleteIsolationSegmentByNameMutex.RUnlock() 124 argsForCall := fake.deleteIsolationSegmentByNameArgsForCall[i] 125 return argsForCall.arg1 126 } 127 128 func (fake *FakeDeleteIsolationSegmentActor) DeleteIsolationSegmentByNameReturns(result1 v3action.Warnings, result2 error) { 129 fake.deleteIsolationSegmentByNameMutex.Lock() 130 defer fake.deleteIsolationSegmentByNameMutex.Unlock() 131 fake.DeleteIsolationSegmentByNameStub = nil 132 fake.deleteIsolationSegmentByNameReturns = struct { 133 result1 v3action.Warnings 134 result2 error 135 }{result1, result2} 136 } 137 138 func (fake *FakeDeleteIsolationSegmentActor) DeleteIsolationSegmentByNameReturnsOnCall(i int, result1 v3action.Warnings, result2 error) { 139 fake.deleteIsolationSegmentByNameMutex.Lock() 140 defer fake.deleteIsolationSegmentByNameMutex.Unlock() 141 fake.DeleteIsolationSegmentByNameStub = nil 142 if fake.deleteIsolationSegmentByNameReturnsOnCall == nil { 143 fake.deleteIsolationSegmentByNameReturnsOnCall = make(map[int]struct { 144 result1 v3action.Warnings 145 result2 error 146 }) 147 } 148 fake.deleteIsolationSegmentByNameReturnsOnCall[i] = struct { 149 result1 v3action.Warnings 150 result2 error 151 }{result1, result2} 152 } 153 154 func (fake *FakeDeleteIsolationSegmentActor) Invocations() map[string][][]interface{} { 155 fake.invocationsMutex.RLock() 156 defer fake.invocationsMutex.RUnlock() 157 fake.cloudControllerAPIVersionMutex.RLock() 158 defer fake.cloudControllerAPIVersionMutex.RUnlock() 159 fake.deleteIsolationSegmentByNameMutex.RLock() 160 defer fake.deleteIsolationSegmentByNameMutex.RUnlock() 161 copiedInvocations := map[string][][]interface{}{} 162 for key, value := range fake.invocations { 163 copiedInvocations[key] = value 164 } 165 return copiedInvocations 166 } 167 168 func (fake *FakeDeleteIsolationSegmentActor) recordInvocation(key string, args []interface{}) { 169 fake.invocationsMutex.Lock() 170 defer fake.invocationsMutex.Unlock() 171 if fake.invocations == nil { 172 fake.invocations = map[string][][]interface{}{} 173 } 174 if fake.invocations[key] == nil { 175 fake.invocations[key] = [][]interface{}{} 176 } 177 fake.invocations[key] = append(fake.invocations[key], args) 178 } 179 180 var _ v6.DeleteIsolationSegmentActor = new(FakeDeleteIsolationSegmentActor)