package mtps

import (
	"fmt"
	"testing"

	_ "git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
	"git.rosy.net.cn/jx-callback/business/model"
	"git.rosy.net.cn/jx-callback/business/partner"
	"git.rosy.net.cn/jx-callback/globals/testinit"
)

func init() {
	testinit.Init()
}

func TestCreateWaybill(t *testing.T) {
	orerID := "817109342000022"
	order, _ := partner.CurOrderManager.LoadOrder(orerID, model.VendorIDJD)
	c := new(DeliveryHandler)
	_, err := c.CreateWaybill(order, 0)
	if err != nil {
		t.Fatal(err.Error())
	}
}

func TestCancelWaybill(t *testing.T) {
	bill := &model.Waybill{
		VendorWaybillID:  "1532332342088966",
		VendorWaybillID2: "55",
	}
	c := new(DeliveryHandler)
	if err := c.CancelWaybill(bill, partner.CancelWaybillReasonOther, ""); err != nil {
		t.Fatal(err.Error())
	}
}

func Test11(t *testing.T) {
	type1 := 3
	type1 |= 2
	fmt.Println(type1)
}
