github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+incompatible/command/v7/v7fakes/fake_rename_space_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v7fakes 3 4 import ( 5 "sync" 6 7 "code.cloudfoundry.org/cli/actor/v7action" 8 v7 "code.cloudfoundry.org/cli/command/v7" 9 ) 10 11 type FakeRenameSpaceActor struct { 12 RenameSpaceByNameAndOrganizationGUIDStub func(string, string, string) (v7action.Space, v7action.Warnings, error) 13 renameSpaceByNameAndOrganizationGUIDMutex sync.RWMutex 14 renameSpaceByNameAndOrganizationGUIDArgsForCall []struct { 15 arg1 string 16 arg2 string 17 arg3 string 18 } 19 renameSpaceByNameAndOrganizationGUIDReturns struct { 20 result1 v7action.Space 21 result2 v7action.Warnings 22 result3 error 23 } 24 renameSpaceByNameAndOrganizationGUIDReturnsOnCall map[int]struct { 25 result1 v7action.Space 26 result2 v7action.Warnings 27 result3 error 28 } 29 invocations map[string][][]interface{} 30 invocationsMutex sync.RWMutex 31 } 32 33 func (fake *FakeRenameSpaceActor) RenameSpaceByNameAndOrganizationGUID(arg1 string, arg2 string, arg3 string) (v7action.Space, v7action.Warnings, error) { 34 fake.renameSpaceByNameAndOrganizationGUIDMutex.Lock() 35 ret, specificReturn := fake.renameSpaceByNameAndOrganizationGUIDReturnsOnCall[len(fake.renameSpaceByNameAndOrganizationGUIDArgsForCall)] 36 fake.renameSpaceByNameAndOrganizationGUIDArgsForCall = append(fake.renameSpaceByNameAndOrganizationGUIDArgsForCall, struct { 37 arg1 string 38 arg2 string 39 arg3 string 40 }{arg1, arg2, arg3}) 41 fake.recordInvocation("RenameSpaceByNameAndOrganizationGUID", []interface{}{arg1, arg2, arg3}) 42 fake.renameSpaceByNameAndOrganizationGUIDMutex.Unlock() 43 if fake.RenameSpaceByNameAndOrganizationGUIDStub != nil { 44 return fake.RenameSpaceByNameAndOrganizationGUIDStub(arg1, arg2, arg3) 45 } 46 if specificReturn { 47 return ret.result1, ret.result2, ret.result3 48 } 49 fakeReturns := fake.renameSpaceByNameAndOrganizationGUIDReturns 50 return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 51 } 52 53 func (fake *FakeRenameSpaceActor) RenameSpaceByNameAndOrganizationGUIDCallCount() int { 54 fake.renameSpaceByNameAndOrganizationGUIDMutex.RLock() 55 defer fake.renameSpaceByNameAndOrganizationGUIDMutex.RUnlock() 56 return len(fake.renameSpaceByNameAndOrganizationGUIDArgsForCall) 57 } 58 59 func (fake *FakeRenameSpaceActor) RenameSpaceByNameAndOrganizationGUIDCalls(stub func(string, string, string) (v7action.Space, v7action.Warnings, error)) { 60 fake.renameSpaceByNameAndOrganizationGUIDMutex.Lock() 61 defer fake.renameSpaceByNameAndOrganizationGUIDMutex.Unlock() 62 fake.RenameSpaceByNameAndOrganizationGUIDStub = stub 63 } 64 65 func (fake *FakeRenameSpaceActor) RenameSpaceByNameAndOrganizationGUIDArgsForCall(i int) (string, string, string) { 66 fake.renameSpaceByNameAndOrganizationGUIDMutex.RLock() 67 defer fake.renameSpaceByNameAndOrganizationGUIDMutex.RUnlock() 68 argsForCall := fake.renameSpaceByNameAndOrganizationGUIDArgsForCall[i] 69 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 70 } 71 72 func (fake *FakeRenameSpaceActor) RenameSpaceByNameAndOrganizationGUIDReturns(result1 v7action.Space, result2 v7action.Warnings, result3 error) { 73 fake.renameSpaceByNameAndOrganizationGUIDMutex.Lock() 74 defer fake.renameSpaceByNameAndOrganizationGUIDMutex.Unlock() 75 fake.RenameSpaceByNameAndOrganizationGUIDStub = nil 76 fake.renameSpaceByNameAndOrganizationGUIDReturns = struct { 77 result1 v7action.Space 78 result2 v7action.Warnings 79 result3 error 80 }{result1, result2, result3} 81 } 82 83 func (fake *FakeRenameSpaceActor) RenameSpaceByNameAndOrganizationGUIDReturnsOnCall(i int, result1 v7action.Space, result2 v7action.Warnings, result3 error) { 84 fake.renameSpaceByNameAndOrganizationGUIDMutex.Lock() 85 defer fake.renameSpaceByNameAndOrganizationGUIDMutex.Unlock() 86 fake.RenameSpaceByNameAndOrganizationGUIDStub = nil 87 if fake.renameSpaceByNameAndOrganizationGUIDReturnsOnCall == nil { 88 fake.renameSpaceByNameAndOrganizationGUIDReturnsOnCall = make(map[int]struct { 89 result1 v7action.Space 90 result2 v7action.Warnings 91 result3 error 92 }) 93 } 94 fake.renameSpaceByNameAndOrganizationGUIDReturnsOnCall[i] = struct { 95 result1 v7action.Space 96 result2 v7action.Warnings 97 result3 error 98 }{result1, result2, result3} 99 } 100 101 func (fake *FakeRenameSpaceActor) Invocations() map[string][][]interface{} { 102 fake.invocationsMutex.RLock() 103 defer fake.invocationsMutex.RUnlock() 104 fake.renameSpaceByNameAndOrganizationGUIDMutex.RLock() 105 defer fake.renameSpaceByNameAndOrganizationGUIDMutex.RUnlock() 106 copiedInvocations := map[string][][]interface{}{} 107 for key, value := range fake.invocations { 108 copiedInvocations[key] = value 109 } 110 return copiedInvocations 111 } 112 113 func (fake *FakeRenameSpaceActor) recordInvocation(key string, args []interface{}) { 114 fake.invocationsMutex.Lock() 115 defer fake.invocationsMutex.Unlock() 116 if fake.invocations == nil { 117 fake.invocations = map[string][][]interface{}{} 118 } 119 if fake.invocations[key] == nil { 120 fake.invocations[key] = [][]interface{}{} 121 } 122 fake.invocations[key] = append(fake.invocations[key], args) 123 } 124 125 var _ v7.RenameSpaceActor = new(FakeRenameSpaceActor)