github.com/liamawhite/cli-with-i18n@v6.32.1-0.20171122084555-dede0a5c3448+incompatible/command/v3/v3fakes/fake_reset_space_isolation_segment_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v3fakes 3 4 import ( 5 "sync" 6 7 "github.com/liamawhite/cli-with-i18n/actor/v3action" 8 "github.com/liamawhite/cli-with-i18n/command/v3" 9 ) 10 11 type FakeResetSpaceIsolationSegmentActor struct { 12 CloudControllerAPIVersionStub func() string 13 cloudControllerAPIVersionMutex sync.RWMutex 14 cloudControllerAPIVersionArgsForCall []struct{} 15 cloudControllerAPIVersionReturns struct { 16 result1 string 17 } 18 cloudControllerAPIVersionReturnsOnCall map[int]struct { 19 result1 string 20 } 21 ResetSpaceIsolationSegmentStub func(orgGUID string, spaceGUID string) (string, v3action.Warnings, error) 22 resetSpaceIsolationSegmentMutex sync.RWMutex 23 resetSpaceIsolationSegmentArgsForCall []struct { 24 orgGUID string 25 spaceGUID string 26 } 27 resetSpaceIsolationSegmentReturns struct { 28 result1 string 29 result2 v3action.Warnings 30 result3 error 31 } 32 resetSpaceIsolationSegmentReturnsOnCall map[int]struct { 33 result1 string 34 result2 v3action.Warnings 35 result3 error 36 } 37 invocations map[string][][]interface{} 38 invocationsMutex sync.RWMutex 39 } 40 41 func (fake *FakeResetSpaceIsolationSegmentActor) CloudControllerAPIVersion() string { 42 fake.cloudControllerAPIVersionMutex.Lock() 43 ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)] 44 fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct{}{}) 45 fake.recordInvocation("CloudControllerAPIVersion", []interface{}{}) 46 fake.cloudControllerAPIVersionMutex.Unlock() 47 if fake.CloudControllerAPIVersionStub != nil { 48 return fake.CloudControllerAPIVersionStub() 49 } 50 if specificReturn { 51 return ret.result1 52 } 53 return fake.cloudControllerAPIVersionReturns.result1 54 } 55 56 func (fake *FakeResetSpaceIsolationSegmentActor) CloudControllerAPIVersionCallCount() int { 57 fake.cloudControllerAPIVersionMutex.RLock() 58 defer fake.cloudControllerAPIVersionMutex.RUnlock() 59 return len(fake.cloudControllerAPIVersionArgsForCall) 60 } 61 62 func (fake *FakeResetSpaceIsolationSegmentActor) CloudControllerAPIVersionReturns(result1 string) { 63 fake.CloudControllerAPIVersionStub = nil 64 fake.cloudControllerAPIVersionReturns = struct { 65 result1 string 66 }{result1} 67 } 68 69 func (fake *FakeResetSpaceIsolationSegmentActor) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) { 70 fake.CloudControllerAPIVersionStub = nil 71 if fake.cloudControllerAPIVersionReturnsOnCall == nil { 72 fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct { 73 result1 string 74 }) 75 } 76 fake.cloudControllerAPIVersionReturnsOnCall[i] = struct { 77 result1 string 78 }{result1} 79 } 80 81 func (fake *FakeResetSpaceIsolationSegmentActor) ResetSpaceIsolationSegment(orgGUID string, spaceGUID string) (string, v3action.Warnings, error) { 82 fake.resetSpaceIsolationSegmentMutex.Lock() 83 ret, specificReturn := fake.resetSpaceIsolationSegmentReturnsOnCall[len(fake.resetSpaceIsolationSegmentArgsForCall)] 84 fake.resetSpaceIsolationSegmentArgsForCall = append(fake.resetSpaceIsolationSegmentArgsForCall, struct { 85 orgGUID string 86 spaceGUID string 87 }{orgGUID, spaceGUID}) 88 fake.recordInvocation("ResetSpaceIsolationSegment", []interface{}{orgGUID, spaceGUID}) 89 fake.resetSpaceIsolationSegmentMutex.Unlock() 90 if fake.ResetSpaceIsolationSegmentStub != nil { 91 return fake.ResetSpaceIsolationSegmentStub(orgGUID, spaceGUID) 92 } 93 if specificReturn { 94 return ret.result1, ret.result2, ret.result3 95 } 96 return fake.resetSpaceIsolationSegmentReturns.result1, fake.resetSpaceIsolationSegmentReturns.result2, fake.resetSpaceIsolationSegmentReturns.result3 97 } 98 99 func (fake *FakeResetSpaceIsolationSegmentActor) ResetSpaceIsolationSegmentCallCount() int { 100 fake.resetSpaceIsolationSegmentMutex.RLock() 101 defer fake.resetSpaceIsolationSegmentMutex.RUnlock() 102 return len(fake.resetSpaceIsolationSegmentArgsForCall) 103 } 104 105 func (fake *FakeResetSpaceIsolationSegmentActor) ResetSpaceIsolationSegmentArgsForCall(i int) (string, string) { 106 fake.resetSpaceIsolationSegmentMutex.RLock() 107 defer fake.resetSpaceIsolationSegmentMutex.RUnlock() 108 return fake.resetSpaceIsolationSegmentArgsForCall[i].orgGUID, fake.resetSpaceIsolationSegmentArgsForCall[i].spaceGUID 109 } 110 111 func (fake *FakeResetSpaceIsolationSegmentActor) ResetSpaceIsolationSegmentReturns(result1 string, result2 v3action.Warnings, result3 error) { 112 fake.ResetSpaceIsolationSegmentStub = nil 113 fake.resetSpaceIsolationSegmentReturns = struct { 114 result1 string 115 result2 v3action.Warnings 116 result3 error 117 }{result1, result2, result3} 118 } 119 120 func (fake *FakeResetSpaceIsolationSegmentActor) ResetSpaceIsolationSegmentReturnsOnCall(i int, result1 string, result2 v3action.Warnings, result3 error) { 121 fake.ResetSpaceIsolationSegmentStub = nil 122 if fake.resetSpaceIsolationSegmentReturnsOnCall == nil { 123 fake.resetSpaceIsolationSegmentReturnsOnCall = make(map[int]struct { 124 result1 string 125 result2 v3action.Warnings 126 result3 error 127 }) 128 } 129 fake.resetSpaceIsolationSegmentReturnsOnCall[i] = struct { 130 result1 string 131 result2 v3action.Warnings 132 result3 error 133 }{result1, result2, result3} 134 } 135 136 func (fake *FakeResetSpaceIsolationSegmentActor) Invocations() map[string][][]interface{} { 137 fake.invocationsMutex.RLock() 138 defer fake.invocationsMutex.RUnlock() 139 fake.cloudControllerAPIVersionMutex.RLock() 140 defer fake.cloudControllerAPIVersionMutex.RUnlock() 141 fake.resetSpaceIsolationSegmentMutex.RLock() 142 defer fake.resetSpaceIsolationSegmentMutex.RUnlock() 143 copiedInvocations := map[string][][]interface{}{} 144 for key, value := range fake.invocations { 145 copiedInvocations[key] = value 146 } 147 return copiedInvocations 148 } 149 150 func (fake *FakeResetSpaceIsolationSegmentActor) recordInvocation(key string, args []interface{}) { 151 fake.invocationsMutex.Lock() 152 defer fake.invocationsMutex.Unlock() 153 if fake.invocations == nil { 154 fake.invocations = map[string][][]interface{}{} 155 } 156 if fake.invocations[key] == nil { 157 fake.invocations[key] = [][]interface{}{} 158 } 159 fake.invocations[key] = append(fake.invocations[key], args) 160 } 161 162 var _ v3.ResetSpaceIsolationSegmentActor = new(FakeResetSpaceIsolationSegmentActor)