From 7286c360b2d44c6c0546798d607ad89628a1dad0 Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 12 Mar 2019 17:10:16 +0800 Subject: [PATCH] - test` --- platformapi/jdapi/store_sku_test.go | 33 +++++++++-------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/platformapi/jdapi/store_sku_test.go b/platformapi/jdapi/store_sku_test.go index 6a3f850a..30c036a6 100644 --- a/platformapi/jdapi/store_sku_test.go +++ b/platformapi/jdapi/store_sku_test.go @@ -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)) }