mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-17 23:16:52 +00:00
Added test file for OKCoin
This commit is contained in:
35
exchanges/okcoin/okcoin_test.go
Normal file
35
exchanges/okcoin/okcoin_test.go
Normal file
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user