123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- // Copyright 2019 github.com. All rights reserved.
- // Use of this source code is governed by github.com.
- package tests
- import (
- "context"
- "testing"
- v1 "smart-supplier-management/pb/v1"
- jsoniter "github.com/json-iterator/go"
- )
- var json = jsoniter.ConfigCompatibleWithStandardLibrary
- /*
- func Test_GenerateFetchVcodeV1(t *testing.T) {
- r, err := client.GenerateFetchVcode(context.Background(), &v1.GenerateFetchVcodeRequest{OrderNo: "123456", Phone: "13882234456", Sid: 26})
- if err == nil {
- s, _ := json.MarshalToString(r)
- t.Log(s)
- } else {
- t.Error("failed to call: ", err)
- }
- }*/
- // 用户生成存件码
- /*func Test_GenerateSaveVcodeV1(t *testing.T) {
- r, err := client.GenerateSaveVcode(context.Background(), &v1.GenerateSaveVcodeRequest{OrderNo: "123456", Phone: "13882234456", Sid: 26})
- if err == nil {
- s, _ := json.MarshalToString(r)
- t.Log(s)
- } else {
- t.Error("failed to call: ", err)
- }
- }
- // 验证存件码
- func Test_VerifySaveVcodeV1(t *testing.T) {
- r, err := client.VerifySaveVcode(context.Background(), &v1.VerifySaveVcodeRequest{SaNo: "CC-00001", Vcode: "853048", Sid: 26})
- if err == nil {
- s, _ := json.MarshalToString(r)
- t.Log(s)
- } else {
- t.Error("failed to call: ", err)
- }
- }
- // 小程序存件
- func Test_OpenBoxBySaveKeyV1(t *testing.T) {
- r, err := client.OpenBoxBySaveKey(context.Background(), &v1.OpenBoxBySaveKeyRequest{SaNo: "CC-00001", OrderNo: "123456", Sid: 26})
- if err == nil {
- s, _ := json.MarshalToString(r)
- t.Log(s)
- } else {
- t.Error("failed to call: ", err)
- }
- }
- */
- /*
- // 用户关门通知
- func Test_UserNotifyCloseBoxV1(t *testing.T) {
- r, err := client.NotifyCloseBox(context.Background(), &v1.NotifyCloseBoxRequest{SaNo: "CC-00001", KeyNo: 2, Sid: 26})
- if err == nil {
- s, _ := json.MarshalToString(r)
- t.Log(s)
- } else {
- t.Error("failed to call: ", err)
- }
- }*/
- /*
- // 门店接单生成存取件码,生成存取件码有问题
- func Test_GenerateSaveAndFetchVcodeV1(t *testing.T) {
- r, err := client.GenerateSaveAndFetchVcode(context.Background(), &v1.GenerateSaveAndFetchVcodeRequest{OrderNo: "123456", Phone: "12334445555", Sid: 26})
- if err == nil {
- s, _ := json.MarshalToString(r)
- t.Log(s)
- } else {
- t.Error("failed to call: ", err)
- }
- }*/
- /*
- //门店取件
- func Test_ShopVerifyFetchVcodeV1(t *testing.T) {
- r, err := client.VerifyFetchVcode(context.Background(), &v1.VerifyFetchVcodeRequest{Vcode: "387019", SaNo: "CC-00001", Sid: 26})
- if err == nil {
- s, _ := json.MarshalToString(r)
- t.Log(s)
- } else {
- t.Error("failed to call: ", err)
- }
- }
- */
- /*
- // 门店取件关门通知
- func Test_ShopFetchNotifyCloseBoxV1(t *testing.T) {
- r, err := client.NotifyCloseBox(context.Background(), &v1.NotifyCloseBoxRequest{SaNo: "CC-00001", KeyNo: 2, Sid: 26})
- if err == nil {
- s, _ := json.MarshalToString(r)
- t.Log(s)
- } else {
- t.Error("failed to call: ", err)
- }
- }*/
- /*
- // 门店存件
- func Test_ShopVerifySaveVcodeV1(t *testing.T) {
- r, err := client.VerifySaveVcode(context.Background(), &v1.VerifySaveVcodeRequest{SaNo: "CC-00001", Vcode: "736472", Sid: 26})
- if err == nil {
- s, _ := json.MarshalToString(r)
- t.Log(s)
- } else {
- t.Error("failed to call: ", err)
- }
- }
- */
- /*
- // 门店存件关门通知
- func Test_ShopSaveNotifyCloseBoxV1(t *testing.T) {
- r, err := client.NotifyCloseBox(context.Background(), &v1.NotifyCloseBoxRequest{SaNo: "CC-00001", KeyNo: 3, Sid: 26})
- if err == nil {
- s, _ := json.MarshalToString(r)
- t.Log(s)
- } else {
- t.Error("failed to call: ", err)
- }
- }
- */
- /*
- // 用户取
- func Test_UserFetchVerifyFetchVcodeV1(t *testing.T) {
- r, err := client.VerifyFetchVcode(context.Background(), &v1.VerifyFetchVcodeRequest{Vcode: "735814", SaNo: "CC-00001", Sid: 26})
- if err == nil {
- s, _ := json.MarshalToString(r)
- t.Log(s)
- } else {
- t.Error("failed to call: ", err)
- }
- }
- */
- // 用户取关门通知
- func Test_UserFetchNotifyCloseBoxV1(t *testing.T) {
- r, err := client.NotifyCloseBox(context.Background(), &v1.NotifyCloseBoxRequest{SaNo: "CC-00001", KeyNo: 3, Sid: 26})
- if err == nil {
- s, _ := json.MarshalToString(r)
- t.Log(s)
- } else {
- t.Error("failed to call: ", err)
- }
- }
|