github.com/cloudfoundry-attic/ltc@v0.0.0-20151123212628-098adc7919fc/app_examiner/fake_app_examiner/fake_app_examiner.go (about)

     1  // This file was generated by counterfeiter
     2  package fake_app_examiner
     3  
     4  import (
     5  	"sync"
     6  
     7  	"github.com/cloudfoundry-incubator/ltc/app_examiner"
     8  )
     9  
    10  type FakeAppExaminer struct {
    11  	ListAppsStub        func() ([]app_examiner.AppInfo, error)
    12  	listAppsMutex       sync.RWMutex
    13  	listAppsArgsForCall []struct{}
    14  	listAppsReturns     struct {
    15  		result1 []app_examiner.AppInfo
    16  		result2 error
    17  	}
    18  	ListCellsStub        func() ([]app_examiner.CellInfo, error)
    19  	listCellsMutex       sync.RWMutex
    20  	listCellsArgsForCall []struct{}
    21  	listCellsReturns     struct {
    22  		result1 []app_examiner.CellInfo
    23  		result2 error
    24  	}
    25  	AppStatusStub        func(appName string) (app_examiner.AppInfo, error)
    26  	appStatusMutex       sync.RWMutex
    27  	appStatusArgsForCall []struct {
    28  		appName string
    29  	}
    30  	appStatusReturns struct {
    31  		result1 app_examiner.AppInfo
    32  		result2 error
    33  	}
    34  	AppExistsStub        func(name string) (bool, error)
    35  	appExistsMutex       sync.RWMutex
    36  	appExistsArgsForCall []struct {
    37  		name string
    38  	}
    39  	appExistsReturns struct {
    40  		result1 bool
    41  		result2 error
    42  	}
    43  	RunningAppInstancesInfoStub        func(name string) (int, bool, error)
    44  	runningAppInstancesInfoMutex       sync.RWMutex
    45  	runningAppInstancesInfoArgsForCall []struct {
    46  		name string
    47  	}
    48  	runningAppInstancesInfoReturns struct {
    49  		result1 int
    50  		result2 bool
    51  		result3 error
    52  	}
    53  }
    54  
    55  func (fake *FakeAppExaminer) ListApps() ([]app_examiner.AppInfo, error) {
    56  	fake.listAppsMutex.Lock()
    57  	fake.listAppsArgsForCall = append(fake.listAppsArgsForCall, struct{}{})
    58  	fake.listAppsMutex.Unlock()
    59  	if fake.ListAppsStub != nil {
    60  		return fake.ListAppsStub()
    61  	} else {
    62  		return fake.listAppsReturns.result1, fake.listAppsReturns.result2
    63  	}
    64  }
    65  
    66  func (fake *FakeAppExaminer) ListAppsCallCount() int {
    67  	fake.listAppsMutex.RLock()
    68  	defer fake.listAppsMutex.RUnlock()
    69  	return len(fake.listAppsArgsForCall)
    70  }
    71  
    72  func (fake *FakeAppExaminer) ListAppsReturns(result1 []app_examiner.AppInfo, result2 error) {
    73  	fake.ListAppsStub = nil
    74  	fake.listAppsReturns = struct {
    75  		result1 []app_examiner.AppInfo
    76  		result2 error
    77  	}{result1, result2}
    78  }
    79  
    80  func (fake *FakeAppExaminer) ListCells() ([]app_examiner.CellInfo, error) {
    81  	fake.listCellsMutex.Lock()
    82  	fake.listCellsArgsForCall = append(fake.listCellsArgsForCall, struct{}{})
    83  	fake.listCellsMutex.Unlock()
    84  	if fake.ListCellsStub != nil {
    85  		return fake.ListCellsStub()
    86  	} else {
    87  		return fake.listCellsReturns.result1, fake.listCellsReturns.result2
    88  	}
    89  }
    90  
    91  func (fake *FakeAppExaminer) ListCellsCallCount() int {
    92  	fake.listCellsMutex.RLock()
    93  	defer fake.listCellsMutex.RUnlock()
    94  	return len(fake.listCellsArgsForCall)
    95  }
    96  
    97  func (fake *FakeAppExaminer) ListCellsReturns(result1 []app_examiner.CellInfo, result2 error) {
    98  	fake.ListCellsStub = nil
    99  	fake.listCellsReturns = struct {
   100  		result1 []app_examiner.CellInfo
   101  		result2 error
   102  	}{result1, result2}
   103  }
   104  
   105  func (fake *FakeAppExaminer) AppStatus(appName string) (app_examiner.AppInfo, error) {
   106  	fake.appStatusMutex.Lock()
   107  	fake.appStatusArgsForCall = append(fake.appStatusArgsForCall, struct {
   108  		appName string
   109  	}{appName})
   110  	fake.appStatusMutex.Unlock()
   111  	if fake.AppStatusStub != nil {
   112  		return fake.AppStatusStub(appName)
   113  	} else {
   114  		return fake.appStatusReturns.result1, fake.appStatusReturns.result2
   115  	}
   116  }
   117  
   118  func (fake *FakeAppExaminer) AppStatusCallCount() int {
   119  	fake.appStatusMutex.RLock()
   120  	defer fake.appStatusMutex.RUnlock()
   121  	return len(fake.appStatusArgsForCall)
   122  }
   123  
   124  func (fake *FakeAppExaminer) AppStatusArgsForCall(i int) string {
   125  	fake.appStatusMutex.RLock()
   126  	defer fake.appStatusMutex.RUnlock()
   127  	return fake.appStatusArgsForCall[i].appName
   128  }
   129  
   130  func (fake *FakeAppExaminer) AppStatusReturns(result1 app_examiner.AppInfo, result2 error) {
   131  	fake.AppStatusStub = nil
   132  	fake.appStatusReturns = struct {
   133  		result1 app_examiner.AppInfo
   134  		result2 error
   135  	}{result1, result2}
   136  }
   137  
   138  func (fake *FakeAppExaminer) AppExists(name string) (bool, error) {
   139  	fake.appExistsMutex.Lock()
   140  	fake.appExistsArgsForCall = append(fake.appExistsArgsForCall, struct {
   141  		name string
   142  	}{name})
   143  	fake.appExistsMutex.Unlock()
   144  	if fake.AppExistsStub != nil {
   145  		return fake.AppExistsStub(name)
   146  	} else {
   147  		return fake.appExistsReturns.result1, fake.appExistsReturns.result2
   148  	}
   149  }
   150  
   151  func (fake *FakeAppExaminer) AppExistsCallCount() int {
   152  	fake.appExistsMutex.RLock()
   153  	defer fake.appExistsMutex.RUnlock()
   154  	return len(fake.appExistsArgsForCall)
   155  }
   156  
   157  func (fake *FakeAppExaminer) AppExistsArgsForCall(i int) string {
   158  	fake.appExistsMutex.RLock()
   159  	defer fake.appExistsMutex.RUnlock()
   160  	return fake.appExistsArgsForCall[i].name
   161  }
   162  
   163  func (fake *FakeAppExaminer) AppExistsReturns(result1 bool, result2 error) {
   164  	fake.AppExistsStub = nil
   165  	fake.appExistsReturns = struct {
   166  		result1 bool
   167  		result2 error
   168  	}{result1, result2}
   169  }
   170  
   171  func (fake *FakeAppExaminer) RunningAppInstancesInfo(name string) (int, bool, error) {
   172  	fake.runningAppInstancesInfoMutex.Lock()
   173  	fake.runningAppInstancesInfoArgsForCall = append(fake.runningAppInstancesInfoArgsForCall, struct {
   174  		name string
   175  	}{name})
   176  	fake.runningAppInstancesInfoMutex.Unlock()
   177  	if fake.RunningAppInstancesInfoStub != nil {
   178  		return fake.RunningAppInstancesInfoStub(name)
   179  	} else {
   180  		return fake.runningAppInstancesInfoReturns.result1, fake.runningAppInstancesInfoReturns.result2, fake.runningAppInstancesInfoReturns.result3
   181  	}
   182  }
   183  
   184  func (fake *FakeAppExaminer) RunningAppInstancesInfoCallCount() int {
   185  	fake.runningAppInstancesInfoMutex.RLock()
   186  	defer fake.runningAppInstancesInfoMutex.RUnlock()
   187  	return len(fake.runningAppInstancesInfoArgsForCall)
   188  }
   189  
   190  func (fake *FakeAppExaminer) RunningAppInstancesInfoArgsForCall(i int) string {
   191  	fake.runningAppInstancesInfoMutex.RLock()
   192  	defer fake.runningAppInstancesInfoMutex.RUnlock()
   193  	return fake.runningAppInstancesInfoArgsForCall[i].name
   194  }
   195  
   196  func (fake *FakeAppExaminer) RunningAppInstancesInfoReturns(result1 int, result2 bool, result3 error) {
   197  	fake.RunningAppInstancesInfoStub = nil
   198  	fake.runningAppInstancesInfoReturns = struct {
   199  		result1 int
   200  		result2 bool
   201  		result3 error
   202  	}{result1, result2, result3}
   203  }
   204  
   205  var _ app_examiner.AppExaminer = new(FakeAppExaminer)