mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-18 15:10:03 +00:00
37 lines
792 B
Cheetah
37 lines
792 B
Cheetah
{{define "test"}}
|
|
package {{.Name}}
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/thrasher-corp/gocryptotrader/config"
|
|
)
|
|
|
|
// Please supply your own keys here for due diligence testing
|
|
const (
|
|
testAPIKey = ""
|
|
testAPISecret = ""
|
|
)
|
|
|
|
var {{.Variable}} {{.CapitalName}}
|
|
|
|
func TestSetDefaults(t *testing.T) {
|
|
{{.Variable}}.SetDefaults()
|
|
}
|
|
|
|
func TestSetup(t *testing.T) {
|
|
cfg := config.GetConfig()
|
|
cfg.LoadConfig("../../testdata/configtest.json")
|
|
{{.Name}}Config, err := cfg.GetExchangeConfig("{{.CapitalName}}")
|
|
if err != nil {
|
|
t.Error("Test Failed - {{.CapitalName}} Setup() init error")
|
|
}
|
|
|
|
{{.Name}}Config.API.AuthenticatedSupport = true
|
|
{{.Name}}Config.API.Credentials.Key = testAPIKey
|
|
{{.Name}}Config.API.Credentials.Secret = testAPISecret
|
|
|
|
{{.Variable}}.Setup({{.Name}}Config)
|
|
}
|
|
{{end}}
|