58 lines
1.5 KiB
Go
58 lines
1.5 KiB
Go
// Code generated by mockery v2.53.5. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
coinmarketcap "converter/infrastructure/coinmarketcap"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// RateProvider is an autogenerated mock type for the RateProvider type
|
|
type RateProvider struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// GetRate provides a mock function with given fields: ctx, fromCode, toCode
|
|
func (_m *RateProvider) GetRate(ctx context.Context, fromCode string, toCode string) (coinmarketcap.RateDTO, error) {
|
|
ret := _m.Called(ctx, fromCode, toCode)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetRate")
|
|
}
|
|
|
|
var r0 coinmarketcap.RateDTO
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) (coinmarketcap.RateDTO, error)); ok {
|
|
return rf(ctx, fromCode, toCode)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, string, string) coinmarketcap.RateDTO); ok {
|
|
r0 = rf(ctx, fromCode, toCode)
|
|
} else {
|
|
r0 = ret.Get(0).(coinmarketcap.RateDTO)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
|
|
r1 = rf(ctx, fromCode, toCode)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// NewRateProvider creates a new instance of RateProvider. 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 NewRateProvider(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *RateProvider {
|
|
mock := &RateProvider{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|