github.com/asifdxtreme/cli@v6.1.3-0.20150123051144-9ead8700b4ae+incompatible/plugin/fakes/fake_cli_connection.go (about)

     1  // This file was generated by counterfeiter
     2  package fakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	. "github.com/cloudfoundry/cli/plugin"
     8  )
     9  
    10  type FakeCliConnection struct {
    11  	CliCommandWithoutTerminalOutputStub        func(args ...string) ([]string, error)
    12  	cliCommandWithoutTerminalOutputMutex       sync.RWMutex
    13  	cliCommandWithoutTerminalOutputArgsForCall []struct {
    14  		args []string
    15  	}
    16  	cliCommandWithoutTerminalOutputReturns struct {
    17  		result1 []string
    18  		result2 error
    19  	}
    20  	CliCommandStub        func(args ...string) ([]string, error)
    21  	cliCommandMutex       sync.RWMutex
    22  	cliCommandArgsForCall []struct {
    23  		args []string
    24  	}
    25  	cliCommandReturns struct {
    26  		result1 []string
    27  		result2 error
    28  	}
    29  }
    30  
    31  func (fake *FakeCliConnection) CliCommandWithoutTerminalOutput(args ...string) ([]string, error) {
    32  	fake.cliCommandWithoutTerminalOutputMutex.Lock()
    33  	defer fake.cliCommandWithoutTerminalOutputMutex.Unlock()
    34  	fake.cliCommandWithoutTerminalOutputArgsForCall = append(fake.cliCommandWithoutTerminalOutputArgsForCall, struct {
    35  		args []string
    36  	}{args})
    37  	if fake.CliCommandWithoutTerminalOutputStub != nil {
    38  		return fake.CliCommandWithoutTerminalOutputStub(args...)
    39  	} else {
    40  		return fake.cliCommandWithoutTerminalOutputReturns.result1, fake.cliCommandWithoutTerminalOutputReturns.result2
    41  	}
    42  }
    43  
    44  func (fake *FakeCliConnection) CliCommandWithoutTerminalOutputCallCount() int {
    45  	fake.cliCommandWithoutTerminalOutputMutex.RLock()
    46  	defer fake.cliCommandWithoutTerminalOutputMutex.RUnlock()
    47  	return len(fake.cliCommandWithoutTerminalOutputArgsForCall)
    48  }
    49  
    50  func (fake *FakeCliConnection) CliCommandWithoutTerminalOutputArgsForCall(i int) []string {
    51  	fake.cliCommandWithoutTerminalOutputMutex.RLock()
    52  	defer fake.cliCommandWithoutTerminalOutputMutex.RUnlock()
    53  	return fake.cliCommandWithoutTerminalOutputArgsForCall[i].args
    54  }
    55  
    56  func (fake *FakeCliConnection) CliCommandWithoutTerminalOutputReturns(result1 []string, result2 error) {
    57  	fake.cliCommandWithoutTerminalOutputReturns = struct {
    58  		result1 []string
    59  		result2 error
    60  	}{result1, result2}
    61  }
    62  
    63  func (fake *FakeCliConnection) CliCommand(args ...string) ([]string, error) {
    64  	fake.cliCommandMutex.Lock()
    65  	defer fake.cliCommandMutex.Unlock()
    66  	fake.cliCommandArgsForCall = append(fake.cliCommandArgsForCall, struct {
    67  		args []string
    68  	}{args})
    69  	if fake.CliCommandStub != nil {
    70  		return fake.CliCommandStub(args...)
    71  	} else {
    72  		return fake.cliCommandReturns.result1, fake.cliCommandReturns.result2
    73  	}
    74  }
    75  
    76  func (fake *FakeCliConnection) CliCommandCallCount() int {
    77  	fake.cliCommandMutex.RLock()
    78  	defer fake.cliCommandMutex.RUnlock()
    79  	return len(fake.cliCommandArgsForCall)
    80  }
    81  
    82  func (fake *FakeCliConnection) CliCommandArgsForCall(i int) []string {
    83  	fake.cliCommandMutex.RLock()
    84  	defer fake.cliCommandMutex.RUnlock()
    85  	return fake.cliCommandArgsForCall[i].args
    86  }
    87  
    88  func (fake *FakeCliConnection) CliCommandReturns(result1 []string, result2 error) {
    89  	fake.cliCommandReturns = struct {
    90  		result1 []string
    91  		result2 error
    92  	}{result1, result2}
    93  }
    94  
    95  var _ CliConnection = new(FakeCliConnection)