mirror of
https://github.com/getAlby/hub.git
synced 2026-08-13 12:33:39 +02:00
* fix: prevent LN client access during shutdown * chore: run mockery * chore: push lnClientShuttingDown inside stopLNClient * fix: use atomic bool for synced access
666 lines
18 KiB
Go
666 lines
18 KiB
Go
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"github.com/getAlby/hub/alby"
|
|
"github.com/getAlby/hub/config"
|
|
"github.com/getAlby/hub/events"
|
|
"github.com/getAlby/hub/lnclient"
|
|
"github.com/getAlby/hub/service"
|
|
"github.com/getAlby/hub/service/keys"
|
|
"github.com/getAlby/hub/swaps"
|
|
"github.com/getAlby/hub/transactions"
|
|
mock "github.com/stretchr/testify/mock"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
// NewMockService creates a new instance of MockService. 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 NewMockService(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockService {
|
|
mock := &MockService{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// MockService is an autogenerated mock type for the Service type
|
|
type MockService struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockService_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockService) EXPECT() *MockService_Expecter {
|
|
return &MockService_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// GetAlbyOAuthSvc provides a mock function for the type MockService
|
|
func (_mock *MockService) GetAlbyOAuthSvc() alby.AlbyOAuthService {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetAlbyOAuthSvc")
|
|
}
|
|
|
|
var r0 alby.AlbyOAuthService
|
|
if returnFunc, ok := ret.Get(0).(func() alby.AlbyOAuthService); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(alby.AlbyOAuthService)
|
|
}
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_GetAlbyOAuthSvc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAlbyOAuthSvc'
|
|
type MockService_GetAlbyOAuthSvc_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetAlbyOAuthSvc is a helper method to define mock.On call
|
|
func (_e *MockService_Expecter) GetAlbyOAuthSvc() *MockService_GetAlbyOAuthSvc_Call {
|
|
return &MockService_GetAlbyOAuthSvc_Call{Call: _e.mock.On("GetAlbyOAuthSvc")}
|
|
}
|
|
|
|
func (_c *MockService_GetAlbyOAuthSvc_Call) Run(run func()) *MockService_GetAlbyOAuthSvc_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetAlbyOAuthSvc_Call) Return(albyOAuthService alby.AlbyOAuthService) *MockService_GetAlbyOAuthSvc_Call {
|
|
_c.Call.Return(albyOAuthService)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetAlbyOAuthSvc_Call) RunAndReturn(run func() alby.AlbyOAuthService) *MockService_GetAlbyOAuthSvc_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetAlbySvc provides a mock function for the type MockService
|
|
func (_mock *MockService) GetAlbySvc() alby.AlbyService {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetAlbySvc")
|
|
}
|
|
|
|
var r0 alby.AlbyService
|
|
if returnFunc, ok := ret.Get(0).(func() alby.AlbyService); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(alby.AlbyService)
|
|
}
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_GetAlbySvc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAlbySvc'
|
|
type MockService_GetAlbySvc_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetAlbySvc is a helper method to define mock.On call
|
|
func (_e *MockService_Expecter) GetAlbySvc() *MockService_GetAlbySvc_Call {
|
|
return &MockService_GetAlbySvc_Call{Call: _e.mock.On("GetAlbySvc")}
|
|
}
|
|
|
|
func (_c *MockService_GetAlbySvc_Call) Run(run func()) *MockService_GetAlbySvc_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetAlbySvc_Call) Return(albyService alby.AlbyService) *MockService_GetAlbySvc_Call {
|
|
_c.Call.Return(albyService)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetAlbySvc_Call) RunAndReturn(run func() alby.AlbyService) *MockService_GetAlbySvc_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetConfig provides a mock function for the type MockService
|
|
func (_mock *MockService) GetConfig() config.Config {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetConfig")
|
|
}
|
|
|
|
var r0 config.Config
|
|
if returnFunc, ok := ret.Get(0).(func() config.Config); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(config.Config)
|
|
}
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_GetConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfig'
|
|
type MockService_GetConfig_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetConfig is a helper method to define mock.On call
|
|
func (_e *MockService_Expecter) GetConfig() *MockService_GetConfig_Call {
|
|
return &MockService_GetConfig_Call{Call: _e.mock.On("GetConfig")}
|
|
}
|
|
|
|
func (_c *MockService_GetConfig_Call) Run(run func()) *MockService_GetConfig_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetConfig_Call) Return(config1 config.Config) *MockService_GetConfig_Call {
|
|
_c.Call.Return(config1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetConfig_Call) RunAndReturn(run func() config.Config) *MockService_GetConfig_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetDB provides a mock function for the type MockService
|
|
func (_mock *MockService) GetDB() *gorm.DB {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetDB")
|
|
}
|
|
|
|
var r0 *gorm.DB
|
|
if returnFunc, ok := ret.Get(0).(func() *gorm.DB); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*gorm.DB)
|
|
}
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_GetDB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDB'
|
|
type MockService_GetDB_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetDB is a helper method to define mock.On call
|
|
func (_e *MockService_Expecter) GetDB() *MockService_GetDB_Call {
|
|
return &MockService_GetDB_Call{Call: _e.mock.On("GetDB")}
|
|
}
|
|
|
|
func (_c *MockService_GetDB_Call) Run(run func()) *MockService_GetDB_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetDB_Call) Return(dB *gorm.DB) *MockService_GetDB_Call {
|
|
_c.Call.Return(dB)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetDB_Call) RunAndReturn(run func() *gorm.DB) *MockService_GetDB_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetEventPublisher provides a mock function for the type MockService
|
|
func (_mock *MockService) GetEventPublisher() events.EventPublisher {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetEventPublisher")
|
|
}
|
|
|
|
var r0 events.EventPublisher
|
|
if returnFunc, ok := ret.Get(0).(func() events.EventPublisher); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(events.EventPublisher)
|
|
}
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_GetEventPublisher_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEventPublisher'
|
|
type MockService_GetEventPublisher_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetEventPublisher is a helper method to define mock.On call
|
|
func (_e *MockService_Expecter) GetEventPublisher() *MockService_GetEventPublisher_Call {
|
|
return &MockService_GetEventPublisher_Call{Call: _e.mock.On("GetEventPublisher")}
|
|
}
|
|
|
|
func (_c *MockService_GetEventPublisher_Call) Run(run func()) *MockService_GetEventPublisher_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetEventPublisher_Call) Return(eventPublisher events.EventPublisher) *MockService_GetEventPublisher_Call {
|
|
_c.Call.Return(eventPublisher)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetEventPublisher_Call) RunAndReturn(run func() events.EventPublisher) *MockService_GetEventPublisher_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetKeys provides a mock function for the type MockService
|
|
func (_mock *MockService) GetKeys() keys.Keys {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetKeys")
|
|
}
|
|
|
|
var r0 keys.Keys
|
|
if returnFunc, ok := ret.Get(0).(func() keys.Keys); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(keys.Keys)
|
|
}
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_GetKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeys'
|
|
type MockService_GetKeys_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetKeys is a helper method to define mock.On call
|
|
func (_e *MockService_Expecter) GetKeys() *MockService_GetKeys_Call {
|
|
return &MockService_GetKeys_Call{Call: _e.mock.On("GetKeys")}
|
|
}
|
|
|
|
func (_c *MockService_GetKeys_Call) Run(run func()) *MockService_GetKeys_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetKeys_Call) Return(keys1 keys.Keys) *MockService_GetKeys_Call {
|
|
_c.Call.Return(keys1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetKeys_Call) RunAndReturn(run func() keys.Keys) *MockService_GetKeys_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetLNClient provides a mock function for the type MockService
|
|
func (_mock *MockService) GetLNClient() lnclient.LNClient {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetLNClient")
|
|
}
|
|
|
|
var r0 lnclient.LNClient
|
|
if returnFunc, ok := ret.Get(0).(func() lnclient.LNClient); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(lnclient.LNClient)
|
|
}
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_GetLNClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLNClient'
|
|
type MockService_GetLNClient_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetLNClient is a helper method to define mock.On call
|
|
func (_e *MockService_Expecter) GetLNClient() *MockService_GetLNClient_Call {
|
|
return &MockService_GetLNClient_Call{Call: _e.mock.On("GetLNClient")}
|
|
}
|
|
|
|
func (_c *MockService_GetLNClient_Call) Run(run func()) *MockService_GetLNClient_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetLNClient_Call) Return(lNClient lnclient.LNClient) *MockService_GetLNClient_Call {
|
|
_c.Call.Return(lNClient)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetLNClient_Call) RunAndReturn(run func() lnclient.LNClient) *MockService_GetLNClient_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetRelayStatuses provides a mock function for the type MockService
|
|
func (_mock *MockService) GetRelayStatuses() []service.RelayStatus {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetRelayStatuses")
|
|
}
|
|
|
|
var r0 []service.RelayStatus
|
|
if returnFunc, ok := ret.Get(0).(func() []service.RelayStatus); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]service.RelayStatus)
|
|
}
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_GetRelayStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRelayStatuses'
|
|
type MockService_GetRelayStatuses_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetRelayStatuses is a helper method to define mock.On call
|
|
func (_e *MockService_Expecter) GetRelayStatuses() *MockService_GetRelayStatuses_Call {
|
|
return &MockService_GetRelayStatuses_Call{Call: _e.mock.On("GetRelayStatuses")}
|
|
}
|
|
|
|
func (_c *MockService_GetRelayStatuses_Call) Run(run func()) *MockService_GetRelayStatuses_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetRelayStatuses_Call) Return(relayStatuss []service.RelayStatus) *MockService_GetRelayStatuses_Call {
|
|
_c.Call.Return(relayStatuss)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetRelayStatuses_Call) RunAndReturn(run func() []service.RelayStatus) *MockService_GetRelayStatuses_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetStartupState provides a mock function for the type MockService
|
|
func (_mock *MockService) GetStartupState() string {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetStartupState")
|
|
}
|
|
|
|
var r0 string
|
|
if returnFunc, ok := ret.Get(0).(func() string); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_GetStartupState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStartupState'
|
|
type MockService_GetStartupState_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetStartupState is a helper method to define mock.On call
|
|
func (_e *MockService_Expecter) GetStartupState() *MockService_GetStartupState_Call {
|
|
return &MockService_GetStartupState_Call{Call: _e.mock.On("GetStartupState")}
|
|
}
|
|
|
|
func (_c *MockService_GetStartupState_Call) Run(run func()) *MockService_GetStartupState_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetStartupState_Call) Return(s string) *MockService_GetStartupState_Call {
|
|
_c.Call.Return(s)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetStartupState_Call) RunAndReturn(run func() string) *MockService_GetStartupState_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetSwapsService provides a mock function for the type MockService
|
|
func (_mock *MockService) GetSwapsService() swaps.SwapsService {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetSwapsService")
|
|
}
|
|
|
|
var r0 swaps.SwapsService
|
|
if returnFunc, ok := ret.Get(0).(func() swaps.SwapsService); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(swaps.SwapsService)
|
|
}
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_GetSwapsService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSwapsService'
|
|
type MockService_GetSwapsService_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetSwapsService is a helper method to define mock.On call
|
|
func (_e *MockService_Expecter) GetSwapsService() *MockService_GetSwapsService_Call {
|
|
return &MockService_GetSwapsService_Call{Call: _e.mock.On("GetSwapsService")}
|
|
}
|
|
|
|
func (_c *MockService_GetSwapsService_Call) Run(run func()) *MockService_GetSwapsService_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetSwapsService_Call) Return(swapsService swaps.SwapsService) *MockService_GetSwapsService_Call {
|
|
_c.Call.Return(swapsService)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetSwapsService_Call) RunAndReturn(run func() swaps.SwapsService) *MockService_GetSwapsService_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetTransactionsService provides a mock function for the type MockService
|
|
func (_mock *MockService) GetTransactionsService() transactions.TransactionsService {
|
|
ret := _mock.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetTransactionsService")
|
|
}
|
|
|
|
var r0 transactions.TransactionsService
|
|
if returnFunc, ok := ret.Get(0).(func() transactions.TransactionsService); ok {
|
|
r0 = returnFunc()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(transactions.TransactionsService)
|
|
}
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_GetTransactionsService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransactionsService'
|
|
type MockService_GetTransactionsService_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetTransactionsService is a helper method to define mock.On call
|
|
func (_e *MockService_Expecter) GetTransactionsService() *MockService_GetTransactionsService_Call {
|
|
return &MockService_GetTransactionsService_Call{Call: _e.mock.On("GetTransactionsService")}
|
|
}
|
|
|
|
func (_c *MockService_GetTransactionsService_Call) Run(run func()) *MockService_GetTransactionsService_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetTransactionsService_Call) Return(transactionsService transactions.TransactionsService) *MockService_GetTransactionsService_Call {
|
|
_c.Call.Return(transactionsService)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_GetTransactionsService_Call) RunAndReturn(run func() transactions.TransactionsService) *MockService_GetTransactionsService_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Shutdown provides a mock function for the type MockService
|
|
func (_mock *MockService) Shutdown() {
|
|
_mock.Called()
|
|
return
|
|
}
|
|
|
|
// MockService_Shutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Shutdown'
|
|
type MockService_Shutdown_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Shutdown is a helper method to define mock.On call
|
|
func (_e *MockService_Expecter) Shutdown() *MockService_Shutdown_Call {
|
|
return &MockService_Shutdown_Call{Call: _e.mock.On("Shutdown")}
|
|
}
|
|
|
|
func (_c *MockService_Shutdown_Call) Run(run func()) *MockService_Shutdown_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_Shutdown_Call) Return() *MockService_Shutdown_Call {
|
|
_c.Call.Return()
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_Shutdown_Call) RunAndReturn(run func()) *MockService_Shutdown_Call {
|
|
_c.Run(run)
|
|
return _c
|
|
}
|
|
|
|
// StartApp provides a mock function for the type MockService
|
|
func (_mock *MockService) StartApp(encryptionKey string) error {
|
|
ret := _mock.Called(encryptionKey)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for StartApp")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = returnFunc(encryptionKey)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_StartApp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartApp'
|
|
type MockService_StartApp_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// StartApp is a helper method to define mock.On call
|
|
// - encryptionKey string
|
|
func (_e *MockService_Expecter) StartApp(encryptionKey interface{}) *MockService_StartApp_Call {
|
|
return &MockService_StartApp_Call{Call: _e.mock.On("StartApp", encryptionKey)}
|
|
}
|
|
|
|
func (_c *MockService_StartApp_Call) Run(run func(encryptionKey string)) *MockService_StartApp_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 *MockService_StartApp_Call) Return(err error) *MockService_StartApp_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_StartApp_Call) RunAndReturn(run func(encryptionKey string) error) *MockService_StartApp_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// StopApp provides a mock function for the type MockService
|
|
func (_mock *MockService) StopApp() {
|
|
_mock.Called()
|
|
return
|
|
}
|
|
|
|
// MockService_StopApp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StopApp'
|
|
type MockService_StopApp_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// StopApp is a helper method to define mock.On call
|
|
func (_e *MockService_Expecter) StopApp() *MockService_StopApp_Call {
|
|
return &MockService_StopApp_Call{Call: _e.mock.On("StopApp")}
|
|
}
|
|
|
|
func (_c *MockService_StopApp_Call) Run(run func()) *MockService_StopApp_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_StopApp_Call) Return() *MockService_StopApp_Call {
|
|
_c.Call.Return()
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_StopApp_Call) RunAndReturn(run func()) *MockService_StopApp_Call {
|
|
_c.Run(run)
|
|
return _c
|
|
}
|