Files
gocryptotrader/cmd/exchange_wrapper_issues/exchange_wrapper_issues_test.go
Ryan O'Hara-Reid 220245c5a8 Exchanges: Include format pair in wrapper functions and test for formatting issues via tool wrapper issues (#582)
* Adds formatting of pair within binance wrapper, adds return of error from cli.ShowCommmandHelp

* Add formatting function to submit order wrapper functions

* Remove superfluous functionality

* Updated exchange wrapper issues to create a disruptive pair to see which exchanges require attention, updates currency code generation and matching

* reinstated format check, fixed tests

* fixed niterinos

* fix test

* fix spelling mistake

* make html file more aesthetic

* Add missing format pairs

* add formatting to pair for BTC Markets func

* fix spelling
2020-10-26 16:54:51 +11:00

31 lines
568 B
Go

package main
import (
"testing"
"github.com/thrasher-corp/gocryptotrader/currency"
)
func TestDisruptFormatting(t *testing.T) {
_, err := disruptFormatting(currency.Pair{})
if err == nil {
t.Fatal("error cannot be nil")
}
_, err = disruptFormatting(currency.Pair{Base: currency.BTC})
if err == nil {
t.Fatal("error cannot be nil")
}
p := currency.NewPair(currency.BTC, currency.USDT)
badPair, err := disruptFormatting(p)
if err != nil {
t.Fatal(err)
}
if badPair.String() != "BTC-TEST-DELIM-usdt" {
t.Fatal("incorrect disrupted pair")
}
}