package aliupcapi

import (
	"fmt"
	"testing"

	"git.rosy.net.cn/baseapi"
	"git.rosy.net.cn/baseapi/utils"
	"go.uber.org/zap"
)

var (
	api         *API
	sugarLogger *zap.SugaredLogger
)

func init() {
	logger, _ := zap.NewDevelopment()
	sugarLogger = logger.Sugar()
	baseapi.Init(sugarLogger)
	api = New("52a6ee59970844eab9bc4de2f397f6f8")
}

func TestGetAliUpcInfo(t *testing.T) {
	result, err := api.GetAliUpcInfo("6920174736731")
	if err != nil {
		t.Fatal(err)
	} else {
		t.Log(utils.Format4Output(result, false))
	}
}

func TestName11111(t *testing.T) {
	syncFlag := 0
	syncFlag |= 8
	fmt.Println(syncFlag)
}
