package mtwmapi

import (
	"testing"

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

func TestShippingSave(t *testing.T) {
	err := api.ShippingSave(testPoiCode, `[{"x":39941199,"y":116385384},{"x":39926983,"y":116361694},{"x":39921586,"y":116398430}]`, 0, 0)
	if err != nil {
		t.Fatal(err)
	}
}

func TestShippingList(t *testing.T) {
	result, err := api.ShippingList("7996691")
	if err != nil {
		t.Fatal(err)
	}
	t.Log(utils.Format4Output(result, false))
}

func TestShippingFetch(t *testing.T) {
	result, err := api.ShippingFetch("7963096")
	if err != nil {
		t.Fatal(err)
	}
	t.Log(utils.Format4Output(result, false))
}
