github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/command/v6/v6fakes/fake_create_isolation_segment_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/v3action" 8 v6 "code.cloudfoundry.org/cli/command/v6" 9 ) 10 11 type FakeCreateIsolationSegmentActor struct { 12 CreateIsolationSegmentByNameStub func(v3action.IsolationSegment) (v3action.Warnings, error) 13 createIsolationSegmentByNameMutex sync.RWMutex 14 createIsolationSegmentByNameArgsForCall []struct { 15 arg1 v3action.IsolationSegment 16 } 17 createIsolationSegmentByNameReturns struct { 18 result1 v3action.Warnings 19 result2 error 20 } 21 createIsolationSegmentByNameReturnsOnCall map[int]struct { 22 result1 v3action.Warnings 23 result2 error 24 } 25 invocations map[string][][]interface{} 26 invocationsMutex sync.RWMutex 27 } 28 29 func (fake *FakeCreateIsolationSegmentActor) CreateIsolationSegmentByName(arg1 v3action.IsolationSegment) (v3action.Warnings, error) { 30 fake.createIsolationSegmentByNameMutex.Lock() 31 ret, specificReturn := fake.createIsolationSegmentByNameReturnsOnCall[len(fake.createIsolationSegmentByNameArgsForCall)] 32 fake.createIsolationSegmentByNameArgsForCall = append(fake.createIsolationSegmentByNameArgsForCall, struct { 33 arg1 v3action.IsolationSegment 34 }{arg1}) 35 fake.recordInvocation("CreateIsolationSegmentByName", []interface{}{arg1}) 36 fake.createIsolationSegmentByNameMutex.Unlock() 37 if fake.CreateIsolationSegmentByNameStub != nil { 38 return fake.CreateIsolationSegmentByNameStub(arg1) 39 } 40 if specificReturn { 41 return ret.result1, ret.result2 42 } 43 fakeReturns := fake.createIsolationSegmentByNameReturns 44 return fakeReturns.result1, fakeReturns.result2 45 } 46 47 func (fake *FakeCreateIsolationSegmentActor) CreateIsolationSegmentByNameCallCount() int { 48 fake.createIsolationSegmentByNameMutex.RLock() 49 defer fake.createIsolationSegmentByNameMutex.RUnlock() 50 return len(fake.createIsolationSegmentByNameArgsForCall) 51 } 52 53 func (fake *FakeCreateIsolationSegmentActor) CreateIsolationSegmentByNameCalls(stub func(v3action.IsolationSegment) (v3action.Warnings, error)) { 54 fake.createIsolationSegmentByNameMutex.Lock() 55 defer fake.createIsolationSegmentByNameMutex.Unlock() 56 fake.CreateIsolationSegmentByNameStub = stub 57 } 58 59 func (fake *FakeCreateIsolationSegmentActor) CreateIsolationSegmentByNameArgsForCall(i int) v3action.IsolationSegment { 60 fake.createIsolationSegmentByNameMutex.RLock() 61 defer fake.createIsolationSegmentByNameMutex.RUnlock() 62 argsForCall := fake.createIsolationSegmentByNameArgsForCall[i] 63 return argsForCall.arg1 64 } 65 66 func (fake *FakeCreateIsolationSegmentActor) CreateIsolationSegmentByNameReturns(result1 v3action.Warnings, result2 error) { 67 fake.createIsolationSegmentByNameMutex.Lock() 68 defer fake.createIsolationSegmentByNameMutex.Unlock() 69 fake.CreateIsolationSegmentByNameStub = nil 70 fake.createIsolationSegmentByNameReturns = struct { 71 result1 v3action.Warnings 72 result2 error 73 }{result1, result2} 74 } 75 76 func (fake *FakeCreateIsolationSegmentActor) CreateIsolationSegmentByNameReturnsOnCall(i int, result1 v3action.Warnings, result2 error) { 77 fake.createIsolationSegmentByNameMutex.Lock() 78 defer fake.createIsolationSegmentByNameMutex.Unlock() 79 fake.CreateIsolationSegmentByNameStub = nil 80 if fake.createIsolationSegmentByNameReturnsOnCall == nil { 81 fake.createIsolationSegmentByNameReturnsOnCall = make(map[int]struct { 82 result1 v3action.Warnings 83 result2 error 84 }) 85 } 86 fake.createIsolationSegmentByNameReturnsOnCall[i] = struct { 87 result1 v3action.Warnings 88 result2 error 89 }{result1, result2} 90 } 91 92 func (fake *FakeCreateIsolationSegmentActor) Invocations() map[string][][]interface{} { 93 fake.invocationsMutex.RLock() 94 defer fake.invocationsMutex.RUnlock() 95 fake.createIsolationSegmentByNameMutex.RLock() 96 defer fake.createIsolationSegmentByNameMutex.RUnlock() 97 copiedInvocations := map[string][][]interface{}{} 98 for key, value := range fake.invocations { 99 copiedInvocations[key] = value 100 } 101 return copiedInvocations 102 } 103 104 func (fake *FakeCreateIsolationSegmentActor) recordInvocation(key string, args []interface{}) { 105 fake.invocationsMutex.Lock() 106 defer fake.invocationsMutex.Unlock() 107 if fake.invocations == nil { 108 fake.invocations = map[string][][]interface{}{} 109 } 110 if fake.invocations[key] == nil { 111 fake.invocations[key] = [][]interface{}{} 112 } 113 fake.invocations[key] = append(fake.invocations[key], args) 114 } 115 116 var _ v6.CreateIsolationSegmentActor = new(FakeCreateIsolationSegmentActor)