package tao_vegetable

import (
	"fmt"
	"git.rosy.net.cn/baseapi/utils"
	"git.rosy.net.cn/jx-callback/globals"
	"strings"
	"testing"
)

func TestQueryToken(t *testing.T) {
	code := ""
	data, err := apiTao.GetStoreToken(code, "")
	globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false))
	globals.SugarLogger.Debugf("err := %s", utils.Format4Output(err, false))
}

func TestRefreshToken(t *testing.T) {
	apiTao.GetRefreshToken(apiTao.refreshToken)
}

func TestReplaceString(t *testing.T) {
	aa := `{
  "store_id": "CRF003",
  "order_status": "PAID",
  "merchant_code": "xxx",
  "biz_order_id": 123456
}`
	dd := strings.ReplaceAll(strings.ReplaceAll(aa, "\n", ""), " ", "")
	fmt.Println(dd)
}
