github.com/rakutentech/cli@v6.12.5-0.20151006231303-24468b65536e+incompatible/plugin/rpc/fakes/fake_non_codegangsta_runner.go (about)

     1  // This file was generated by counterfeiter
     2  package fakes
     3  
     4  import (
     5  	"sync"
     6  
     7  	"github.com/cloudfoundry/cli/cf/command_registry"
     8  	"github.com/cloudfoundry/cli/plugin/rpc"
     9  )
    10  
    11  type FakeNonCodegangstaRunner struct {
    12  	CommandStub        func([]string, command_registry.Dependency, bool) error
    13  	commandMutex       sync.RWMutex
    14  	commandArgsForCall []struct {
    15  		arg1 []string
    16  		arg2 command_registry.Dependency
    17  		arg3 bool
    18  	}
    19  	commandReturns struct {
    20  		result1 error
    21  	}
    22  }
    23  
    24  func (fake *FakeNonCodegangstaRunner) Command(arg1 []string, arg2 command_registry.Dependency, arg3 bool) error {
    25  	fake.commandMutex.Lock()
    26  	fake.commandArgsForCall = append(fake.commandArgsForCall, struct {
    27  		arg1 []string
    28  		arg2 command_registry.Dependency
    29  		arg3 bool
    30  	}{arg1, arg2, arg3})
    31  	fake.commandMutex.Unlock()
    32  	if fake.CommandStub != nil {
    33  		return fake.CommandStub(arg1, arg2, arg3)
    34  	} else {
    35  		return fake.commandReturns.result1
    36  	}
    37  }
    38  
    39  func (fake *FakeNonCodegangstaRunner) CommandCallCount() int {
    40  	fake.commandMutex.RLock()
    41  	defer fake.commandMutex.RUnlock()
    42  	return len(fake.commandArgsForCall)
    43  }
    44  
    45  func (fake *FakeNonCodegangstaRunner) CommandArgsForCall(i int) ([]string, command_registry.Dependency, bool) {
    46  	fake.commandMutex.RLock()
    47  	defer fake.commandMutex.RUnlock()
    48  	return fake.commandArgsForCall[i].arg1, fake.commandArgsForCall[i].arg2, fake.commandArgsForCall[i].arg3
    49  }
    50  
    51  func (fake *FakeNonCodegangstaRunner) CommandReturns(result1 error) {
    52  	fake.CommandStub = nil
    53  	fake.commandReturns = struct {
    54  		result1 error
    55  	}{result1}
    56  }
    57  
    58  var _ rpc.NonCodegangstaRunner = new(FakeNonCodegangstaRunner)