-
Notifications
You must be signed in to change notification settings - Fork 0
/
Marketdata.go
76 lines (60 loc) · 1.77 KB
/
Marketdata.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Code generated by mockery v2.18.0. DO NOT EDIT.
package mocks
import (
entity "github.com/lhjnilsson/foreverbull/finance/entity"
mock "github.com/stretchr/testify/mock"
time "time"
)
// Marketdata is an autogenerated mock type for the Marketdata type
type Marketdata struct {
mock.Mock
}
// GetAsset provides a mock function with given fields: symbol
func (_m *Marketdata) GetAsset(symbol string) (*entity.Asset, error) {
ret := _m.Called(symbol)
var r0 *entity.Asset
if rf, ok := ret.Get(0).(func(string) *entity.Asset); ok {
r0 = rf(symbol)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*entity.Asset)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(symbol)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetOHLC provides a mock function with given fields: symbol, start, end
func (_m *Marketdata) GetOHLC(symbol string, start time.Time, end time.Time) (*[]entity.OHLC, error) {
ret := _m.Called(symbol, start, end)
var r0 *[]entity.OHLC
if rf, ok := ret.Get(0).(func(string, time.Time, time.Time) *[]entity.OHLC); ok {
r0 = rf(symbol, start, end)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*[]entity.OHLC)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, time.Time, time.Time) error); ok {
r1 = rf(symbol, start, end)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type mockConstructorTestingTNewMarketdata interface {
mock.TestingT
Cleanup(func())
}
// NewMarketdata creates a new instance of Marketdata. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMarketdata(t mockConstructorTestingTNewMarketdata) *Marketdata {
mock := &Marketdata{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}