mocks

package
v0.21.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	mock.Mock
}

Service is an autogenerated mock type for the Service type

func NewService

func NewService(t interface {
	mock.TestingT
	Cleanup(func())
}) *Service

NewService creates a new instance of Service. 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 (*Service) EXPECT

func (_m *Service) EXPECT() *Service_Expecter

func (*Service) HasCurrency

func (_m *Service) HasCurrency(ctx context.Context, _a1 string) (bool, error)

HasCurrency provides a mock function with given fields: ctx, _a1

func (*Service) HasCurrencyAtDate

func (_m *Service) HasCurrencyAtDate(ctx context.Context, _a1 string, date time.Time) (bool, error)

HasCurrencyAtDate provides a mock function with given fields: ctx, _a1, date

func (*Service) ToCurrency

func (_m *Service) ToCurrency(ctx context.Context, toCurrency string, value float64, fromCurrency string) (float64, error)

ToCurrency provides a mock function with given fields: ctx, toCurrency, value, fromCurrency

func (*Service) ToCurrencyAtDate

func (_m *Service) ToCurrencyAtDate(ctx context.Context, toCurrency string, value float64, fromCurrency string, date time.Time) (float64, error)

ToCurrencyAtDate provides a mock function with given fields: ctx, toCurrency, value, fromCurrency, date

func (*Service) ToEur

func (_m *Service) ToEur(ctx context.Context, value float64, fromCurrency string) (float64, error)

ToEur provides a mock function with given fields: ctx, value, fromCurrency

func (*Service) ToEurAtDate

func (_m *Service) ToEurAtDate(ctx context.Context, value float64, fromCurrency string, date time.Time) (float64, error)

ToEurAtDate provides a mock function with given fields: ctx, value, fromCurrency, date

func (*Service) ToUsd

func (_m *Service) ToUsd(ctx context.Context, value float64, fromCurrency string) (float64, error)

ToUsd provides a mock function with given fields: ctx, value, fromCurrency

func (*Service) ToUsdAtDate

func (_m *Service) ToUsdAtDate(ctx context.Context, value float64, fromCurrency string, date time.Time) (float64, error)

ToUsdAtDate provides a mock function with given fields: ctx, value, fromCurrency, date

type Service_Expecter

type Service_Expecter struct {
	// contains filtered or unexported fields
}

func (*Service_Expecter) HasCurrency

func (_e *Service_Expecter) HasCurrency(ctx interface{}, _a1 interface{}) *Service_HasCurrency_Call

HasCurrency is a helper method to define mock.On call

  • ctx context.Context
  • _a1 string

func (*Service_Expecter) HasCurrencyAtDate

func (_e *Service_Expecter) HasCurrencyAtDate(ctx interface{}, _a1 interface{}, date interface{}) *Service_HasCurrencyAtDate_Call

HasCurrencyAtDate is a helper method to define mock.On call

  • ctx context.Context
  • _a1 string
  • date time.Time

func (*Service_Expecter) ToCurrency

func (_e *Service_Expecter) ToCurrency(ctx interface{}, toCurrency interface{}, value interface{}, fromCurrency interface{}) *Service_ToCurrency_Call

ToCurrency is a helper method to define mock.On call

  • ctx context.Context
  • toCurrency string
  • value float64
  • fromCurrency string

func (*Service_Expecter) ToCurrencyAtDate

func (_e *Service_Expecter) ToCurrencyAtDate(ctx interface{}, toCurrency interface{}, value interface{}, fromCurrency interface{}, date interface{}) *Service_ToCurrencyAtDate_Call

ToCurrencyAtDate is a helper method to define mock.On call

  • ctx context.Context
  • toCurrency string
  • value float64
  • fromCurrency string
  • date time.Time

func (*Service_Expecter) ToEur

func (_e *Service_Expecter) ToEur(ctx interface{}, value interface{}, fromCurrency interface{}) *Service_ToEur_Call

ToEur is a helper method to define mock.On call

  • ctx context.Context
  • value float64
  • fromCurrency string

func (*Service_Expecter) ToEurAtDate

func (_e *Service_Expecter) ToEurAtDate(ctx interface{}, value interface{}, fromCurrency interface{}, date interface{}) *Service_ToEurAtDate_Call

ToEurAtDate is a helper method to define mock.On call

  • ctx context.Context
  • value float64
  • fromCurrency string
  • date time.Time

func (*Service_Expecter) ToUsd

func (_e *Service_Expecter) ToUsd(ctx interface{}, value interface{}, fromCurrency interface{}) *Service_ToUsd_Call

ToUsd is a helper method to define mock.On call

  • ctx context.Context
  • value float64
  • fromCurrency string

func (*Service_Expecter) ToUsdAtDate

func (_e *Service_Expecter) ToUsdAtDate(ctx interface{}, value interface{}, fromCurrency interface{}, date interface{}) *Service_ToUsdAtDate_Call

ToUsdAtDate is a helper method to define mock.On call

  • ctx context.Context
  • value float64
  • fromCurrency string
  • date time.Time

type Service_HasCurrencyAtDate_Call

type Service_HasCurrencyAtDate_Call struct {
	*mock.Call
}

Service_HasCurrencyAtDate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasCurrencyAtDate'

func (*Service_HasCurrencyAtDate_Call) Return

func (*Service_HasCurrencyAtDate_Call) Run

func (*Service_HasCurrencyAtDate_Call) RunAndReturn

type Service_HasCurrency_Call

type Service_HasCurrency_Call struct {
	*mock.Call
}

Service_HasCurrency_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasCurrency'

func (*Service_HasCurrency_Call) Return

func (*Service_HasCurrency_Call) Run

func (*Service_HasCurrency_Call) RunAndReturn

type Service_ToCurrencyAtDate_Call

type Service_ToCurrencyAtDate_Call struct {
	*mock.Call
}

Service_ToCurrencyAtDate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ToCurrencyAtDate'

func (*Service_ToCurrencyAtDate_Call) Return

func (*Service_ToCurrencyAtDate_Call) Run

func (_c *Service_ToCurrencyAtDate_Call) Run(run func(ctx context.Context, toCurrency string, value float64, fromCurrency string, date time.Time)) *Service_ToCurrencyAtDate_Call

func (*Service_ToCurrencyAtDate_Call) RunAndReturn

type Service_ToCurrency_Call

type Service_ToCurrency_Call struct {
	*mock.Call
}

Service_ToCurrency_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ToCurrency'

func (*Service_ToCurrency_Call) Return

func (*Service_ToCurrency_Call) Run

func (_c *Service_ToCurrency_Call) Run(run func(ctx context.Context, toCurrency string, value float64, fromCurrency string)) *Service_ToCurrency_Call

func (*Service_ToCurrency_Call) RunAndReturn

type Service_ToEurAtDate_Call

type Service_ToEurAtDate_Call struct {
	*mock.Call
}

Service_ToEurAtDate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ToEurAtDate'

func (*Service_ToEurAtDate_Call) Return

func (*Service_ToEurAtDate_Call) Run

func (_c *Service_ToEurAtDate_Call) Run(run func(ctx context.Context, value float64, fromCurrency string, date time.Time)) *Service_ToEurAtDate_Call

func (*Service_ToEurAtDate_Call) RunAndReturn

type Service_ToEur_Call

type Service_ToEur_Call struct {
	*mock.Call
}

Service_ToEur_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ToEur'

func (*Service_ToEur_Call) Return

func (_c *Service_ToEur_Call) Return(_a0 float64, _a1 error) *Service_ToEur_Call

func (*Service_ToEur_Call) Run

func (_c *Service_ToEur_Call) Run(run func(ctx context.Context, value float64, fromCurrency string)) *Service_ToEur_Call

func (*Service_ToEur_Call) RunAndReturn

func (_c *Service_ToEur_Call) RunAndReturn(run func(context.Context, float64, string) (float64, error)) *Service_ToEur_Call

type Service_ToUsdAtDate_Call

type Service_ToUsdAtDate_Call struct {
	*mock.Call
}

Service_ToUsdAtDate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ToUsdAtDate'

func (*Service_ToUsdAtDate_Call) Return

func (*Service_ToUsdAtDate_Call) Run

func (_c *Service_ToUsdAtDate_Call) Run(run func(ctx context.Context, value float64, fromCurrency string, date time.Time)) *Service_ToUsdAtDate_Call

func (*Service_ToUsdAtDate_Call) RunAndReturn

type Service_ToUsd_Call

type Service_ToUsd_Call struct {
	*mock.Call
}

Service_ToUsd_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ToUsd'

func (*Service_ToUsd_Call) Return

func (_c *Service_ToUsd_Call) Return(_a0 float64, _a1 error) *Service_ToUsd_Call

func (*Service_ToUsd_Call) Run

func (_c *Service_ToUsd_Call) Run(run func(ctx context.Context, value float64, fromCurrency string)) *Service_ToUsd_Call

func (*Service_ToUsd_Call) RunAndReturn

func (_c *Service_ToUsd_Call) RunAndReturn(run func(context.Context, float64, string) (float64, error)) *Service_ToUsd_Call

type UpdaterService

type UpdaterService struct {
	mock.Mock
}

UpdaterService is an autogenerated mock type for the UpdaterService type

func NewUpdaterService

func NewUpdaterService(t interface {
	mock.TestingT
	Cleanup(func())
}) *UpdaterService

NewUpdaterService creates a new instance of UpdaterService. 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 (*UpdaterService) EXPECT

func (*UpdaterService) EnsureHistoricalExchangeRates

func (_m *UpdaterService) EnsureHistoricalExchangeRates(ctx context.Context) error

EnsureHistoricalExchangeRates provides a mock function with given fields: ctx

func (*UpdaterService) EnsureRecentExchangeRates

func (_m *UpdaterService) EnsureRecentExchangeRates(ctx context.Context) error

EnsureRecentExchangeRates provides a mock function with given fields: ctx

type UpdaterService_EnsureHistoricalExchangeRates_Call

type UpdaterService_EnsureHistoricalExchangeRates_Call struct {
	*mock.Call
}

UpdaterService_EnsureHistoricalExchangeRates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureHistoricalExchangeRates'

func (*UpdaterService_EnsureHistoricalExchangeRates_Call) Return

func (*UpdaterService_EnsureHistoricalExchangeRates_Call) Run

func (*UpdaterService_EnsureHistoricalExchangeRates_Call) RunAndReturn

type UpdaterService_EnsureRecentExchangeRates_Call

type UpdaterService_EnsureRecentExchangeRates_Call struct {
	*mock.Call
}

UpdaterService_EnsureRecentExchangeRates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureRecentExchangeRates'

func (*UpdaterService_EnsureRecentExchangeRates_Call) Return

func (*UpdaterService_EnsureRecentExchangeRates_Call) Run

func (*UpdaterService_EnsureRecentExchangeRates_Call) RunAndReturn

type UpdaterService_Expecter

type UpdaterService_Expecter struct {
	// contains filtered or unexported fields
}

func (*UpdaterService_Expecter) EnsureHistoricalExchangeRates

func (_e *UpdaterService_Expecter) EnsureHistoricalExchangeRates(ctx interface{}) *UpdaterService_EnsureHistoricalExchangeRates_Call

EnsureHistoricalExchangeRates is a helper method to define mock.On call

  • ctx context.Context

func (*UpdaterService_Expecter) EnsureRecentExchangeRates

func (_e *UpdaterService_Expecter) EnsureRecentExchangeRates(ctx interface{}) *UpdaterService_EnsureRecentExchangeRates_Call

EnsureRecentExchangeRates is a helper method to define mock.On call

  • ctx context.Context

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL