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