github.com/argoproj/argo-cd/v3@v3.2.1/util/io/mocks/TempPaths.go (about)

     1  // Code generated by mockery; DO NOT EDIT.
     2  // github.com/vektra/mockery
     3  // template: testify
     4  
     5  package mocks
     6  
     7  import (
     8  	mock "github.com/stretchr/testify/mock"
     9  )
    10  
    11  // NewTempPaths creates a new instance of TempPaths. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    12  // The first argument is typically a *testing.T value.
    13  func NewTempPaths(t interface {
    14  	mock.TestingT
    15  	Cleanup(func())
    16  }) *TempPaths {
    17  	mock := &TempPaths{}
    18  	mock.Mock.Test(t)
    19  
    20  	t.Cleanup(func() { mock.AssertExpectations(t) })
    21  
    22  	return mock
    23  }
    24  
    25  // TempPaths is an autogenerated mock type for the TempPaths type
    26  type TempPaths struct {
    27  	mock.Mock
    28  }
    29  
    30  type TempPaths_Expecter struct {
    31  	mock *mock.Mock
    32  }
    33  
    34  func (_m *TempPaths) EXPECT() *TempPaths_Expecter {
    35  	return &TempPaths_Expecter{mock: &_m.Mock}
    36  }
    37  
    38  // Add provides a mock function for the type TempPaths
    39  func (_mock *TempPaths) Add(key string, value string) {
    40  	_mock.Called(key, value)
    41  	return
    42  }
    43  
    44  // TempPaths_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
    45  type TempPaths_Add_Call struct {
    46  	*mock.Call
    47  }
    48  
    49  // Add is a helper method to define mock.On call
    50  //   - key string
    51  //   - value string
    52  func (_e *TempPaths_Expecter) Add(key interface{}, value interface{}) *TempPaths_Add_Call {
    53  	return &TempPaths_Add_Call{Call: _e.mock.On("Add", key, value)}
    54  }
    55  
    56  func (_c *TempPaths_Add_Call) Run(run func(key string, value string)) *TempPaths_Add_Call {
    57  	_c.Call.Run(func(args mock.Arguments) {
    58  		var arg0 string
    59  		if args[0] != nil {
    60  			arg0 = args[0].(string)
    61  		}
    62  		var arg1 string
    63  		if args[1] != nil {
    64  			arg1 = args[1].(string)
    65  		}
    66  		run(
    67  			arg0,
    68  			arg1,
    69  		)
    70  	})
    71  	return _c
    72  }
    73  
    74  func (_c *TempPaths_Add_Call) Return() *TempPaths_Add_Call {
    75  	_c.Call.Return()
    76  	return _c
    77  }
    78  
    79  func (_c *TempPaths_Add_Call) RunAndReturn(run func(key string, value string)) *TempPaths_Add_Call {
    80  	_c.Run(run)
    81  	return _c
    82  }
    83  
    84  // GetPath provides a mock function for the type TempPaths
    85  func (_mock *TempPaths) GetPath(key string) (string, error) {
    86  	ret := _mock.Called(key)
    87  
    88  	if len(ret) == 0 {
    89  		panic("no return value specified for GetPath")
    90  	}
    91  
    92  	var r0 string
    93  	var r1 error
    94  	if returnFunc, ok := ret.Get(0).(func(string) (string, error)); ok {
    95  		return returnFunc(key)
    96  	}
    97  	if returnFunc, ok := ret.Get(0).(func(string) string); ok {
    98  		r0 = returnFunc(key)
    99  	} else {
   100  		r0 = ret.Get(0).(string)
   101  	}
   102  	if returnFunc, ok := ret.Get(1).(func(string) error); ok {
   103  		r1 = returnFunc(key)
   104  	} else {
   105  		r1 = ret.Error(1)
   106  	}
   107  	return r0, r1
   108  }
   109  
   110  // TempPaths_GetPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPath'
   111  type TempPaths_GetPath_Call struct {
   112  	*mock.Call
   113  }
   114  
   115  // GetPath is a helper method to define mock.On call
   116  //   - key string
   117  func (_e *TempPaths_Expecter) GetPath(key interface{}) *TempPaths_GetPath_Call {
   118  	return &TempPaths_GetPath_Call{Call: _e.mock.On("GetPath", key)}
   119  }
   120  
   121  func (_c *TempPaths_GetPath_Call) Run(run func(key string)) *TempPaths_GetPath_Call {
   122  	_c.Call.Run(func(args mock.Arguments) {
   123  		var arg0 string
   124  		if args[0] != nil {
   125  			arg0 = args[0].(string)
   126  		}
   127  		run(
   128  			arg0,
   129  		)
   130  	})
   131  	return _c
   132  }
   133  
   134  func (_c *TempPaths_GetPath_Call) Return(s string, err error) *TempPaths_GetPath_Call {
   135  	_c.Call.Return(s, err)
   136  	return _c
   137  }
   138  
   139  func (_c *TempPaths_GetPath_Call) RunAndReturn(run func(key string) (string, error)) *TempPaths_GetPath_Call {
   140  	_c.Call.Return(run)
   141  	return _c
   142  }
   143  
   144  // GetPathIfExists provides a mock function for the type TempPaths
   145  func (_mock *TempPaths) GetPathIfExists(key string) string {
   146  	ret := _mock.Called(key)
   147  
   148  	if len(ret) == 0 {
   149  		panic("no return value specified for GetPathIfExists")
   150  	}
   151  
   152  	var r0 string
   153  	if returnFunc, ok := ret.Get(0).(func(string) string); ok {
   154  		r0 = returnFunc(key)
   155  	} else {
   156  		r0 = ret.Get(0).(string)
   157  	}
   158  	return r0
   159  }
   160  
   161  // TempPaths_GetPathIfExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPathIfExists'
   162  type TempPaths_GetPathIfExists_Call struct {
   163  	*mock.Call
   164  }
   165  
   166  // GetPathIfExists is a helper method to define mock.On call
   167  //   - key string
   168  func (_e *TempPaths_Expecter) GetPathIfExists(key interface{}) *TempPaths_GetPathIfExists_Call {
   169  	return &TempPaths_GetPathIfExists_Call{Call: _e.mock.On("GetPathIfExists", key)}
   170  }
   171  
   172  func (_c *TempPaths_GetPathIfExists_Call) Run(run func(key string)) *TempPaths_GetPathIfExists_Call {
   173  	_c.Call.Run(func(args mock.Arguments) {
   174  		var arg0 string
   175  		if args[0] != nil {
   176  			arg0 = args[0].(string)
   177  		}
   178  		run(
   179  			arg0,
   180  		)
   181  	})
   182  	return _c
   183  }
   184  
   185  func (_c *TempPaths_GetPathIfExists_Call) Return(s string) *TempPaths_GetPathIfExists_Call {
   186  	_c.Call.Return(s)
   187  	return _c
   188  }
   189  
   190  func (_c *TempPaths_GetPathIfExists_Call) RunAndReturn(run func(key string) string) *TempPaths_GetPathIfExists_Call {
   191  	_c.Call.Return(run)
   192  	return _c
   193  }
   194  
   195  // GetPaths provides a mock function for the type TempPaths
   196  func (_mock *TempPaths) GetPaths() map[string]string {
   197  	ret := _mock.Called()
   198  
   199  	if len(ret) == 0 {
   200  		panic("no return value specified for GetPaths")
   201  	}
   202  
   203  	var r0 map[string]string
   204  	if returnFunc, ok := ret.Get(0).(func() map[string]string); ok {
   205  		r0 = returnFunc()
   206  	} else {
   207  		if ret.Get(0) != nil {
   208  			r0 = ret.Get(0).(map[string]string)
   209  		}
   210  	}
   211  	return r0
   212  }
   213  
   214  // TempPaths_GetPaths_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPaths'
   215  type TempPaths_GetPaths_Call struct {
   216  	*mock.Call
   217  }
   218  
   219  // GetPaths is a helper method to define mock.On call
   220  func (_e *TempPaths_Expecter) GetPaths() *TempPaths_GetPaths_Call {
   221  	return &TempPaths_GetPaths_Call{Call: _e.mock.On("GetPaths")}
   222  }
   223  
   224  func (_c *TempPaths_GetPaths_Call) Run(run func()) *TempPaths_GetPaths_Call {
   225  	_c.Call.Run(func(args mock.Arguments) {
   226  		run()
   227  	})
   228  	return _c
   229  }
   230  
   231  func (_c *TempPaths_GetPaths_Call) Return(stringToString map[string]string) *TempPaths_GetPaths_Call {
   232  	_c.Call.Return(stringToString)
   233  	return _c
   234  }
   235  
   236  func (_c *TempPaths_GetPaths_Call) RunAndReturn(run func() map[string]string) *TempPaths_GetPaths_Call {
   237  	_c.Call.Return(run)
   238  	return _c
   239  }