package third import ( "go-template/business/util" "testing" ) // make test test_func=Test_ebikeFactoryApi_GetOpWorkerDetailById test_pkg=./business/third/ func Test_ebikeFactoryApi_GetOpWorkerDetailById(t *testing.T) { context := util.MockContext() t.Run("调用测试", func(t *testing.T) { resp, err := NewEbikeFactoryApi().GetOpWorkerDetailById(context, 201) if err != nil { t.Fatal(err) } if resp == nil { t.Logf("未获取到结果") } else { t.Logf("获取结果: %+v", resp) } }) }