mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-02 23:16:51 +00:00
Tests: Use currency.NewBTCUSD and NewBTCUSDT (#1895)
* Tests: Use currency.NewUSD and NewUSDT Simple refactor to use the provided shortcut methods * Github: Add CI check to ensure NewPair not used Add a step to ensure NewPair(BTC, USD*) isn't used
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
func testSetup() Base {
|
||||
return Base{
|
||||
Exchange: "a",
|
||||
Pair: currency.NewPair(currency.BTC, currency.USD),
|
||||
Pair: currency.NewBTCUSD(),
|
||||
Asks: []Tranche{
|
||||
{Price: 7000, Amount: 1},
|
||||
{Price: 7001, Amount: 2},
|
||||
|
||||
@@ -31,7 +31,7 @@ func TestSubscribeToExchangeOrderbooks(t *testing.T) {
|
||||
_, err := SubscribeToExchangeOrderbooks("")
|
||||
assert.ErrorIs(t, err, ErrOrderbookNotFound)
|
||||
|
||||
p := currency.NewPair(currency.BTC, currency.USD)
|
||||
p := currency.NewBTCUSD()
|
||||
|
||||
b := Base{
|
||||
Pair: p,
|
||||
@@ -51,7 +51,7 @@ func TestVerify(t *testing.T) {
|
||||
b := Base{
|
||||
Exchange: "TestExchange",
|
||||
Asset: asset.Spot,
|
||||
Pair: currency.NewPair(currency.BTC, currency.USD),
|
||||
Pair: currency.NewBTCUSD(),
|
||||
VerifyOrderbook: true,
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ func TestSimulate(t *testing.T) {
|
||||
},
|
||||
}
|
||||
o, err := b.UpdateOrderbook(t.Context(),
|
||||
currency.NewPair(currency.BTC, currency.USD), asset.Spot)
|
||||
currency.NewBTCUSD(), asset.Spot)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user