From 061e2a239db542c20612f2918afcf1690d4c1d2b Mon Sep 17 00:00:00 2001 From: Ryan O'Hara-Reid Date: Thu, 23 Nov 2017 11:29:38 +1100 Subject: [PATCH] Added test file for OKCoin --- exchanges/okcoin/okcoin_test.go | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 exchanges/okcoin/okcoin_test.go diff --git a/exchanges/okcoin/okcoin_test.go b/exchanges/okcoin/okcoin_test.go new file mode 100644 index 00000000..5ef3dced --- /dev/null +++ b/exchanges/okcoin/okcoin_test.go @@ -0,0 +1,35 @@ +package okcoin + +import ( + "testing" + + "github.com/thrasher-/gocryptotrader/config" +) + +var o OKCoin + +// Please supply your own APIKEYS here for due diligence testing + +const ( + apiKey = "" + apiSecret = "" +) + +func TestSetDefaults(t *testing.T) { + o.SetDefaults() +} + +func TestSetup(t *testing.T) { + cfg := config.GetConfig() + cfg.LoadConfig("../../testdata/configtest.json") + okcoinConfig, err := cfg.GetExchangeConfig("OKCOIN International") + if err != nil { + t.Error("Test Failed - OKCoin Setup() init error") + } + + okcoinConfig.AuthenticatedAPISupport = true + okcoinConfig.APIKey = apiKey + okcoinConfig.APISecret = apiSecret + + o.Setup(okcoinConfig) +}