github.com/willmadison/cli@v6.40.1-0.20181018160101-29d5937903ff+incompatible/command/v6/v6fakes/fake_reset_space_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 FakeResetSpaceIsolationSegmentActor 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 ResetSpaceIsolationSegmentStub func(string, string) (string, v3action.Warnings, error) 23 resetSpaceIsolationSegmentMutex sync.RWMutex 24 resetSpaceIsolationSegmentArgsForCall []struct { 25 arg1 string 26 arg2 string 27 } 28 resetSpaceIsolationSegmentReturns struct { 29 result1 string 30 result2 v3action.Warnings 31 result3 error 32 } 33 resetSpaceIsolationSegmentReturnsOnCall map[int]struct { 34 result1 string 35 result2 v3action.Warnings 36 result3 error 37 } 38 invocations map[string][][]interface{} 39 invocationsMutex sync.RWMutex 40 } 41 42 func (fake *FakeResetSpaceIsolationSegmentActor) CloudControllerAPIVersion() string { 43 fake.cloudControllerAPIVersionMutex.Lock() 44 ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)] 45 fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct { 46 }{}) 47 fake.recordInvocation("CloudControllerAPIVersion", []interface{}{}) 48 fake.cloudControllerAPIVersionMutex.Unlock() 49 if fake.CloudControllerAPIVersionStub != nil { 50 return fake.CloudControllerAPIVersionStub() 51 } 52 if specificReturn { 53 return ret.result1 54 } 55 fakeReturns := fake.cloudControllerAPIVersionReturns 56 return fakeReturns.result1 57 } 58 59 func (fake *FakeResetSpaceIsolationSegmentActor) CloudControllerAPIVersionCallCount() int { 60 fake.cloudControllerAPIVersionMutex.RLock() 61 defer fake.cloudControllerAPIVersionMutex.RUnlock() 62 return len(fake.cloudControllerAPIVersionArgsForCall) 63 } 64 65 func (fake *FakeResetSpaceIsolationSegmentActor) CloudControllerAPIVersionCalls(stub func() string) { 66 fake.cloudControllerAPIVersionMutex.Lock() 67 defer fake.cloudControllerAPIVersionMutex.Unlock() 68 fake.CloudControllerAPIVersionStub = stub 69 } 70 71 func (fake *FakeResetSpaceIsolationSegmentActor) CloudControllerAPIVersionReturns(result1 string) { 72 fake.cloudControllerAPIVersionMutex.Lock() 73 defer fake.cloudControllerAPIVersionMutex.Unlock() 74 fake.CloudControllerAPIVersionStub = nil 75 fake.cloudControllerAPIVersionReturns = struct { 76 result1 string 77 }{result1} 78 } 79 80 func (fake *FakeResetSpaceIsolationSegmentActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) { 81 fake.cloudControllerAPIVersionMutex.Lock() 82 defer fake.cloudControllerAPIVersionMutex.Unlock() 83 fake.CloudControllerAPIVersionStub = nil 84 if fake.cloudControllerAPIVersionReturnsOnCall == nil { 85 fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct { 86 result1 string 87 }) 88 } 89 fake.cloudControllerAPIVersionReturnsOnCall[i] = struct { 90 result1 string 91 }{result1} 92 } 93 94 func (fake *FakeResetSpaceIsolationSegmentActor) ResetSpaceIsolationSegment(arg1 string, arg2 string) (string, v3action.Warnings, error) { 95 fake.resetSpaceIsolationSegmentMutex.Lock() 96 ret, specificReturn := fake.resetSpaceIsolationSegmentReturnsOnCall[len(fake.resetSpaceIsolationSegmentArgsForCall)] 97 fake.resetSpaceIsolationSegmentArgsForCall = append(fake.resetSpaceIsolationSegmentArgsForCall, struct { 98 arg1 string 99 arg2 string 100 }{arg1, arg2}) 101 fake.recordInvocation("ResetSpaceIsolationSegment", []interface{}{arg1, arg2}) 102 fake.resetSpaceIsolationSegmentMutex.Unlock() 103 if fake.ResetSpaceIsolationSegmentStub != nil { 104 return fake.ResetSpaceIsolationSegmentStub(arg1, arg2) 105 } 106 if specificReturn { 107 return ret.result1, ret.result2, ret.result3 108 } 109 fakeReturns := fake.resetSpaceIsolationSegmentReturns 110 return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 111 } 112 113 func (fake *FakeResetSpaceIsolationSegmentActor) ResetSpaceIsolationSegmentCallCount() int { 114 fake.resetSpaceIsolationSegmentMutex.RLock() 115 defer fake.resetSpaceIsolationSegmentMutex.RUnlock() 116 return len(fake.resetSpaceIsolationSegmentArgsForCall) 117 } 118 119 func (fake *FakeResetSpaceIsolationSegmentActor) ResetSpaceIsolationSegmentCalls(stub func(string, string) (string, v3action.Warnings, error)) { 120 fake.resetSpaceIsolationSegmentMutex.Lock() 121 defer fake.resetSpaceIsolationSegmentMutex.Unlock() 122 fake.ResetSpaceIsolationSegmentStub = stub 123 } 124 125 func (fake *FakeResetSpaceIsolationSegmentActor) ResetSpaceIsolationSegmentArgsForCall(i int) (string, string) { 126 fake.resetSpaceIsolationSegmentMutex.RLock() 127 defer fake.resetSpaceIsolationSegmentMutex.RUnlock() 128 argsForCall := fake.resetSpaceIsolationSegmentArgsForCall[i] 129 return argsForCall.arg1, argsForCall.arg2 130 } 131 132 func (fake *FakeResetSpaceIsolationSegmentActor) ResetSpaceIsolationSegmentReturns(result1 string, result2 v3action.Warnings, result3 error) { 133 fake.resetSpaceIsolationSegmentMutex.Lock() 134 defer fake.resetSpaceIsolationSegmentMutex.Unlock() 135 fake.ResetSpaceIsolationSegmentStub = nil 136 fake.resetSpaceIsolationSegmentReturns = struct { 137 result1 string 138 result2 v3action.Warnings 139 result3 error 140 }{result1, result2, result3} 141 } 142 143 func (fake *FakeResetSpaceIsolationSegmentActor) ResetSpaceIsolationSegmentReturnsOnCall(i int, result1 string, result2 v3action.Warnings, result3 error) { 144 fake.resetSpaceIsolationSegmentMutex.Lock() 145 defer fake.resetSpaceIsolationSegmentMutex.Unlock() 146 fake.ResetSpaceIsolationSegmentStub = nil 147 if fake.resetSpaceIsolationSegmentReturnsOnCall == nil { 148 fake.resetSpaceIsolationSegmentReturnsOnCall = make(map[int]struct { 149 result1 string 150 result2 v3action.Warnings 151 result3 error 152 }) 153 } 154 fake.resetSpaceIsolationSegmentReturnsOnCall[i] = struct { 155 result1 string 156 result2 v3action.Warnings 157 result3 error 158 }{result1, result2, result3} 159 } 160 161 func (fake *FakeResetSpaceIsolationSegmentActor) Invocations() map[string][][]interface{} { 162 fake.invocationsMutex.RLock() 163 defer fake.invocationsMutex.RUnlock() 164 fake.cloudControllerAPIVersionMutex.RLock() 165 defer fake.cloudControllerAPIVersionMutex.RUnlock() 166 fake.resetSpaceIsolationSegmentMutex.RLock() 167 defer fake.resetSpaceIsolationSegmentMutex.RUnlock() 168 copiedInvocations := map[string][][]interface{}{} 169 for key, value := range fake.invocations { 170 copiedInvocations[key] = value 171 } 172 return copiedInvocations 173 } 174 175 func (fake *FakeResetSpaceIsolationSegmentActor) recordInvocation(key string, args []interface{}) { 176 fake.invocationsMutex.Lock() 177 defer fake.invocationsMutex.Unlock() 178 if fake.invocations == nil { 179 fake.invocations = map[string][][]interface{}{} 180 } 181 if fake.invocations[key] == nil { 182 fake.invocations[key] = [][]interface{}{} 183 } 184 fake.invocations[key] = append(fake.invocations[key], args) 185 } 186 187 var _ v6.ResetSpaceIsolationSegmentActor = new(FakeResetSpaceIsolationSegmentActor)