(t *testing.T)
| 1665 | } |
| 1666 | |
| 1667 | func TestFormatSymbol(t *testing.T) { |
| 1668 | b := Base{} |
| 1669 | spotStore := currency.PairStore{ |
| 1670 | RequestFormat: ¤cy.PairFormat{Uppercase: true}, |
| 1671 | ConfigFormat: ¤cy.PairFormat{ |
| 1672 | Delimiter: currency.DashDelimiter, |
| 1673 | Uppercase: true, |
| 1674 | }, |
| 1675 | } |
| 1676 | err := b.SetAssetPairStore(asset.Spot, spotStore) |
| 1677 | require.NoError(t, err, "SetAssetPairStore must not error") |
| 1678 | p := currency.NewBTCUSD().Format(*spotStore.ConfigFormat) |
| 1679 | sym, err := b.FormatSymbol(p, asset.Spot) |
| 1680 | require.NoError(t, err, "FormatSymbol must not error") |
| 1681 | assert.Equal(t, "BTCUSD", sym, "FormatSymbol should format the pair correctly") |
| 1682 | _, err = b.FormatSymbol(p, asset.Futures) |
| 1683 | assert.ErrorIs(t, err, asset.ErrNotSupported) |
| 1684 | } |
| 1685 | |
| 1686 | func TestSetAPIURL(t *testing.T) { |
| 1687 | b := Base{ |
nothing calls this directly
no test coverage detected