对接新供应链-唯品尚
This commit is contained in:
@@ -159,6 +159,53 @@ func TestWeiPinShangClient_CreateOrder(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestWeiPinShangClient_GetOrderInfo(t *testing.T) {
|
||||
type fields struct {
|
||||
Host string
|
||||
ChannelType string
|
||||
Key string
|
||||
}
|
||||
type args struct {
|
||||
orderNo string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
fields fields
|
||||
args args
|
||||
wantRes *GetOrderInfoRes
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "test1",
|
||||
fields: fields{
|
||||
Host: "https://uat.api.weipinshang.net/",
|
||||
ChannelType: "AILEHUI",
|
||||
Key: "f654ea5bde7635c3f46191191e5c4c8e",
|
||||
},
|
||||
args: args{
|
||||
orderNo: "20250527172503439229",
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
h := &WeiPinShangClient{
|
||||
Host: test.fields.Host,
|
||||
ChannelType: test.fields.ChannelType,
|
||||
Key: test.fields.Key,
|
||||
}
|
||||
|
||||
gotRes, err := h.GetOrderInfo(test.args.orderNo)
|
||||
|
||||
log.Println(gotRes, err)
|
||||
|
||||
if (err != nil) != test.wantErr {
|
||||
t.Errorf("GetManyPostage() error = %v, wantErr %v", err, test.wantErr)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestWeiPinShangClient_GetOrderInfoByItemNO(t *testing.T) {
|
||||
type fields struct {
|
||||
Host string
|
||||
@@ -233,6 +280,17 @@ func TestWeiPinShangClient_GetOrderInfoByThirdNO(t *testing.T) {
|
||||
orderNo: "10000000000",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "test1",
|
||||
fields: fields{
|
||||
Host: "https://uat.api.weipinshang.net/",
|
||||
ChannelType: "AILEHUI",
|
||||
Key: "f654ea5bde7635c3f46191191e5c4c8e",
|
||||
},
|
||||
args: args{
|
||||
orderNo: "20250527172503439229",
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user