-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExchangeToMarketPrices.go
74 lines (57 loc) · 2.26 KB
/
ExchangeToMarketPrices.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
// Code generated by mockery v2.14.0. DO NOT EDIT.
package mocks
import (
time "time"
pricefeedtypes "github.com/jinxprotocol/v4-chain/protocol/daemons/pricefeed/types"
mock "github.com/stretchr/testify/mock"
types "github.com/jinxprotocol/v4-chain/protocol/daemons/pricefeed/client/types"
)
// ExchangeToMarketPrices is an autogenerated mock type for the ExchangeToMarketPrices type
type ExchangeToMarketPrices struct {
mock.Mock
}
// GetAllPrices provides a mock function with given fields:
func (_m *ExchangeToMarketPrices) GetAllPrices() map[string][]types.MarketPriceTimestamp {
ret := _m.Called()
var r0 map[string][]types.MarketPriceTimestamp
if rf, ok := ret.Get(0).(func() map[string][]types.MarketPriceTimestamp); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string][]types.MarketPriceTimestamp)
}
}
return r0
}
// GetIndexPrice provides a mock function with given fields: marketId, cutoffTime, resolver
func (_m *ExchangeToMarketPrices) GetIndexPrice(marketId uint32, cutoffTime time.Time, resolver pricefeedtypes.Resolver) (uint64, int) {
ret := _m.Called(marketId, cutoffTime, resolver)
var r0 uint64
if rf, ok := ret.Get(0).(func(uint32, time.Time, pricefeedtypes.Resolver) uint64); ok {
r0 = rf(marketId, cutoffTime, resolver)
} else {
r0 = ret.Get(0).(uint64)
}
var r1 int
if rf, ok := ret.Get(1).(func(uint32, time.Time, pricefeedtypes.Resolver) int); ok {
r1 = rf(marketId, cutoffTime, resolver)
} else {
r1 = ret.Get(1).(int)
}
return r0, r1
}
// UpdatePrice provides a mock function with given fields: exchangeId, marketPriceTimestamp
func (_m *ExchangeToMarketPrices) UpdatePrice(exchangeId string, marketPriceTimestamp *types.MarketPriceTimestamp) {
_m.Called(exchangeId, marketPriceTimestamp)
}
type mockConstructorTestingTNewExchangeToMarketPrices interface {
mock.TestingT
Cleanup(func())
}
// NewExchangeToMarketPrices creates a new instance of ExchangeToMarketPrices. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewExchangeToMarketPrices(t mockConstructorTestingTNewExchangeToMarketPrices) *ExchangeToMarketPrices {
mock := &ExchangeToMarketPrices{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}