github.com/asifdxtreme/cli@v6.1.3-0.20150123051144-9ead8700b4ae+incompatible/testhelpers/commands/fake_application_restarter.go (about)

     1  // This file was generated by counterfeiter
     2  package commands
     3  
     4  import (
     5  	"sync"
     6  
     7  	. "github.com/cloudfoundry/cli/cf/commands/application"
     8  	"github.com/cloudfoundry/cli/cf/models"
     9  )
    10  
    11  type FakeApplicationRestarter struct {
    12  	ApplicationRestartStub        func(app models.Application, orgName string, spaceName string)
    13  	applicationRestartMutex       sync.RWMutex
    14  	applicationRestartArgsForCall []struct {
    15  		arg1 models.Application
    16  		arg2 string
    17  		arg3 string
    18  	}
    19  }
    20  
    21  func (fake *FakeApplicationRestarter) ApplicationRestart(arg1 models.Application, arg2 string, arg3 string) {
    22  	fake.applicationRestartMutex.Lock()
    23  	defer fake.applicationRestartMutex.Unlock()
    24  	fake.applicationRestartArgsForCall = append(fake.applicationRestartArgsForCall, struct {
    25  		arg1 models.Application
    26  		arg2 string
    27  		arg3 string
    28  	}{arg1, arg2, arg3})
    29  	if fake.ApplicationRestartStub != nil {
    30  		fake.ApplicationRestartStub(arg1, arg2, arg3)
    31  	}
    32  }
    33  
    34  func (fake *FakeApplicationRestarter) ApplicationRestartCallCount() int {
    35  	fake.applicationRestartMutex.RLock()
    36  	defer fake.applicationRestartMutex.RUnlock()
    37  	return len(fake.applicationRestartArgsForCall)
    38  }
    39  
    40  func (fake *FakeApplicationRestarter) ApplicationRestartArgsForCall(i int) (models.Application, string, string) {
    41  	fake.applicationRestartMutex.RLock()
    42  	defer fake.applicationRestartMutex.RUnlock()
    43  	return fake.applicationRestartArgsForCall[i].arg1, fake.applicationRestartArgsForCall[i].arg2, fake.applicationRestartArgsForCall[i].arg3
    44  }
    45  
    46  var _ ApplicationRestarter = new(FakeApplicationRestarter)