mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-19 15:10:05 +00:00
21 lines
458 B
Go
21 lines
458 B
Go
package currency
|
|
|
|
import "testing"
|
|
|
|
func TestGetSymbolByCurrencyName(t *testing.T) {
|
|
expected := "₩"
|
|
actual, err := GetSymbolByCurrencyName(KPW)
|
|
if err != nil {
|
|
t.Errorf("TestGetSymbolByCurrencyName error: %s", err)
|
|
}
|
|
|
|
if actual != expected {
|
|
t.Errorf("TestGetSymbolByCurrencyName differing values")
|
|
}
|
|
|
|
_, err = GetSymbolByCurrencyName(Code{})
|
|
if err == nil {
|
|
t.Errorf("TestGetSymbolByCurrencyNam returned nil on non-existent currency")
|
|
}
|
|
}
|