package jcqapi

import (
	"fmt"
	"testing"

	"git.rosy.net.cn/baseapi/utils"

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

var (
	api         *API
	sugarLogger *zap.SugaredLogger
)

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

func TestConsumeInfo(t *testing.T) {
	fmt.Println(utils.Str2Float64("2.60"))
}

func TestAPI_ConsumeInfo2(t *testing.T) {
	result, _ := api.ConsumeInfo2("open_message_pop_order_create_E1D746D42474D5F1F1A10CECE75D99F6", "open_message_573819178445", 32)
	for _, val := range result {
		fmt.Println("")
		fmt.Println(val.MessageBody)
	}
}
