- test`
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package jdapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/baseapi"
|
||||
@@ -53,26 +51,15 @@ func TestQueryStockCenter(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
type TTest struct {
|
||||
A int
|
||||
}
|
||||
|
||||
func (t *TTest) Foo(param1 int, param2 string) string {
|
||||
fmt.Println(param1, param2)
|
||||
return utils.Int2Str(param1) + "|" + param2
|
||||
}
|
||||
|
||||
func TestIt(t *testing.T) {
|
||||
var param1, param2 interface{}
|
||||
param1 = 1
|
||||
param2 = "bbb"
|
||||
var tt interface{}
|
||||
tt = &TTest{}
|
||||
ttValue := reflect.ValueOf(tt)
|
||||
funcFoo := ttValue.MethodByName("Foo")
|
||||
params := []reflect.Value{
|
||||
reflect.ValueOf(param1),
|
||||
reflect.ValueOf(param2),
|
||||
func TestBatchUpdateVendibility(t *testing.T) {
|
||||
result, err := jdapi.BatchUpdateVendibility("100130", "", []*StockVendibility{
|
||||
&StockVendibility{
|
||||
OutSkuId: "26919",
|
||||
DoSale: true,
|
||||
},
|
||||
}, "test")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
fmt.Println(funcFoo.Call(params)[0])
|
||||
baseapi.SugarLogger.Debug(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user