MCPcopy
hub / github.com/thrasher-corp/gocryptotrader / TestFormatExchangeCurrency

Function TestFormatExchangeCurrency

exchanges/exchange_test.go:728–741  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

726}
727
728func TestFormatExchangeCurrency(t *testing.T) {
729 t.Parallel()
730
731 var b Base
732 b.CurrencyPairs.UseGlobalFormat = true
733 b.CurrencyPairs.RequestFormat = &currency.PairFormat{
734 Uppercase: true,
735 Delimiter: "-",
736 }
737
738 actual, err := b.FormatExchangeCurrency(btcusdPair, asset.Spot)
739 require.NoError(t, err, "FormatExchangeCurrency must not error")
740 assert.Equal(t, "BTC-USD", actual.String(), "FormatExchangeCurrency should format pair correctly")
741}
742
743func TestSetEnabled(t *testing.T) {
744 t.Parallel()

Callers

nothing calls this directly

Calls 3

StringMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected