github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/plugin/v7/rpc/rpcfakes/fake_terminal_output_switch.go (about) 1 // +build V7 2 3 // Code generated by counterfeiter. DO NOT EDIT. 4 package rpcfakes 5 6 import ( 7 "sync" 8 9 "code.cloudfoundry.org/cli/plugin/v7/rpc" 10 ) 11 12 type FakeTerminalOutputSwitch struct { 13 DisableTerminalOutputStub func(bool) 14 disableTerminalOutputMutex sync.RWMutex 15 disableTerminalOutputArgsForCall []struct { 16 arg1 bool 17 } 18 invocations map[string][][]interface{} 19 invocationsMutex sync.RWMutex 20 } 21 22 func (fake *FakeTerminalOutputSwitch) DisableTerminalOutput(arg1 bool) { 23 fake.disableTerminalOutputMutex.Lock() 24 fake.disableTerminalOutputArgsForCall = append(fake.disableTerminalOutputArgsForCall, struct { 25 arg1 bool 26 }{arg1}) 27 fake.recordInvocation("DisableTerminalOutput", []interface{}{arg1}) 28 fake.disableTerminalOutputMutex.Unlock() 29 if fake.DisableTerminalOutputStub != nil { 30 fake.DisableTerminalOutputStub(arg1) 31 } 32 } 33 34 func (fake *FakeTerminalOutputSwitch) DisableTerminalOutputCallCount() int { 35 fake.disableTerminalOutputMutex.RLock() 36 defer fake.disableTerminalOutputMutex.RUnlock() 37 return len(fake.disableTerminalOutputArgsForCall) 38 } 39 40 func (fake *FakeTerminalOutputSwitch) DisableTerminalOutputCalls(stub func(bool)) { 41 fake.disableTerminalOutputMutex.Lock() 42 defer fake.disableTerminalOutputMutex.Unlock() 43 fake.DisableTerminalOutputStub = stub 44 } 45 46 func (fake *FakeTerminalOutputSwitch) DisableTerminalOutputArgsForCall(i int) bool { 47 fake.disableTerminalOutputMutex.RLock() 48 defer fake.disableTerminalOutputMutex.RUnlock() 49 argsForCall := fake.disableTerminalOutputArgsForCall[i] 50 return argsForCall.arg1 51 } 52 53 func (fake *FakeTerminalOutputSwitch) Invocations() map[string][][]interface{} { 54 fake.invocationsMutex.RLock() 55 defer fake.invocationsMutex.RUnlock() 56 fake.disableTerminalOutputMutex.RLock() 57 defer fake.disableTerminalOutputMutex.RUnlock() 58 copiedInvocations := map[string][][]interface{}{} 59 for key, value := range fake.invocations { 60 copiedInvocations[key] = value 61 } 62 return copiedInvocations 63 } 64 65 func (fake *FakeTerminalOutputSwitch) recordInvocation(key string, args []interface{}) { 66 fake.invocationsMutex.Lock() 67 defer fake.invocationsMutex.Unlock() 68 if fake.invocations == nil { 69 fake.invocations = map[string][][]interface{}{} 70 } 71 if fake.invocations[key] == nil { 72 fake.invocations[key] = [][]interface{}{} 73 } 74 fake.invocations[key] = append(fake.invocations[key], args) 75 } 76 77 var _ rpc.TerminalOutputSwitch = new(FakeTerminalOutputSwitch)