ebike_factory_api_third_test.go 518 B

12345678910111213141516171819202122
  1. package third
  2. import (
  3. "go-template/business/util"
  4. "testing"
  5. )
  6. // make test test_func=Test_ebikeFactoryApi_GetOpWorkerDetailById test_pkg=./business/third/
  7. func Test_ebikeFactoryApi_GetOpWorkerDetailById(t *testing.T) {
  8. context := util.MockContext()
  9. t.Run("调用测试", func(t *testing.T) {
  10. resp, err := NewEbikeFactoryApi().GetOpWorkerDetailById(context, 201)
  11. if err != nil {
  12. t.Fatal(err)
  13. }
  14. if resp == nil {
  15. t.Logf("未获取到结果")
  16. } else {
  17. t.Logf("获取结果: %+v", resp)
  18. }
  19. })
  20. }