//go:build integration

package rpc

import (
	"encoding/json"
	"fmt"
	"testing"

	pb "bsm/full/module/ec/order/pb"
)

func TestOrderListByStore(t *testing.T) {
	conn, ctx := GetCoon()
	client := pb.NewMgtClient(conn)

	defer conn.Close()
	data := pb.OrderListByStoreRequest{
		PageNo:   1,
		PageSize: 5,
	}
	re, _ := json.Marshal(&data)
	fmt.Printf("发送的测试消息: %s\n", re)
	res, err := client.OrderListByStore(ctx, &data)
	if err != nil {
		panic(err)
	}
	s, _ := json.Marshal(res)
	fmt.Printf("返回的测试消息: %s", s)
}
