mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-23 11:35:25 -04:00
157 lines
4.5 KiB
Go
157 lines
4.5 KiB
Go
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks_version
|
|
|
|
import (
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewMockVersionFetcher creates a new instance of MockVersionFetcher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewMockVersionFetcher(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockVersionFetcher {
|
|
mock := &MockVersionFetcher{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// MockVersionFetcher is an autogenerated mock type for the VersionFetcher type
|
|
type MockVersionFetcher struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockVersionFetcher_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockVersionFetcher) EXPECT() *MockVersionFetcher_Expecter {
|
|
return &MockVersionFetcher_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// GetCurrentVersion provides a mock function for the type MockVersionFetcher
|
|
func (_mock *MockVersionFetcher) GetCurrentVersion(dmsPath string) (string, error) {
|
|
ret := _mock.Called(dmsPath)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetCurrentVersion")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(string) (string, error)); ok {
|
|
return returnFunc(dmsPath)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(string) string); ok {
|
|
r0 = returnFunc(dmsPath)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = returnFunc(dmsPath)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// MockVersionFetcher_GetCurrentVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentVersion'
|
|
type MockVersionFetcher_GetCurrentVersion_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetCurrentVersion is a helper method to define mock.On call
|
|
// - dmsPath string
|
|
func (_e *MockVersionFetcher_Expecter) GetCurrentVersion(dmsPath any) *MockVersionFetcher_GetCurrentVersion_Call {
|
|
return &MockVersionFetcher_GetCurrentVersion_Call{Call: _e.mock.On("GetCurrentVersion", dmsPath)}
|
|
}
|
|
|
|
func (_c *MockVersionFetcher_GetCurrentVersion_Call) Run(run func(dmsPath string)) *MockVersionFetcher_GetCurrentVersion_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 string
|
|
if args[0] != nil {
|
|
arg0 = args[0].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockVersionFetcher_GetCurrentVersion_Call) Return(s string, err error) *MockVersionFetcher_GetCurrentVersion_Call {
|
|
_c.Call.Return(s, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockVersionFetcher_GetCurrentVersion_Call) RunAndReturn(run func(dmsPath string) (string, error)) *MockVersionFetcher_GetCurrentVersion_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetLatestVersion provides a mock function for the type MockVersionFetcher
|
|
func (_mock *MockVersionFetcher) GetLatestVersion(dmsPath string) (string, error) {
|
|
ret := _mock.Called(dmsPath)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetLatestVersion")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(string) (string, error)); ok {
|
|
return returnFunc(dmsPath)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(string) string); ok {
|
|
r0 = returnFunc(dmsPath)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = returnFunc(dmsPath)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// MockVersionFetcher_GetLatestVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestVersion'
|
|
type MockVersionFetcher_GetLatestVersion_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetLatestVersion is a helper method to define mock.On call
|
|
// - dmsPath string
|
|
func (_e *MockVersionFetcher_Expecter) GetLatestVersion(dmsPath any) *MockVersionFetcher_GetLatestVersion_Call {
|
|
return &MockVersionFetcher_GetLatestVersion_Call{Call: _e.mock.On("GetLatestVersion", dmsPath)}
|
|
}
|
|
|
|
func (_c *MockVersionFetcher_GetLatestVersion_Call) Run(run func(dmsPath string)) *MockVersionFetcher_GetLatestVersion_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 string
|
|
if args[0] != nil {
|
|
arg0 = args[0].(string)
|
|
}
|
|
run(
|
|
arg0,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockVersionFetcher_GetLatestVersion_Call) Return(s string, err error) *MockVersionFetcher_GetLatestVersion_Call {
|
|
_c.Call.Return(s, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockVersionFetcher_GetLatestVersion_Call) RunAndReturn(run func(dmsPath string) (string, error)) *MockVersionFetcher_GetLatestVersion_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|