Files
gocryptotrader/currency/symbol/symbol_test.go
2017-09-14 15:08:20 +10:00

22 lines
498 B
Go

package symbol
import "testing"
func TestGetSymbolByCurrencyName(t *testing.T) {
expected := "₩"
actual, err := GetSymbolByCurrencyName("KPW")
if err != nil {
t.Errorf("Test failed. TestGetSymbolByCurrencyName error: %s", err)
}
if actual != expected {
t.Errorf("Test failed. TestGetSymbolByCurrencyName differing values")
}
_, err = GetSymbolByCurrencyName("BLAH")
if err == nil {
t.Errorf("Test failed. TestGetSymbolByCurrencyNam returned nil on non-existant currency")
}
}