annual_inspection_test.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package order
  2. import (
  3. "context"
  4. "gd_service/apis"
  5. "encoding/json"
  6. "testing"
  7. )
  8. func Test_ServiceGetAnnualInspectionTime(t *testing.T) {
  9. req := apis.ServiceGetAnnualInspectionTimeReq{AppKey: "123456", PlateNo: "川A33E22"}
  10. reply := apis.ServiceGetAnnualInspectionTimeReply{}
  11. if err := xcli.Call(context.Background(), "ServiceGetAnnualInspectionTime", req, &reply); err != nil {
  12. t.Error("failed to call: ", err)
  13. } else {
  14. d, _ := json.Marshal(reply)
  15. t.Log(string(d))
  16. }
  17. }
  18. func Test_ServiceGetAnnualInspectionCity(t *testing.T) {
  19. req := apis.ServiceGetAnnualInspectionCityReq{AppKey: "123456"}
  20. reply := apis.ServiceGetAnnualInspectionCityReply{}
  21. if err := xcli.Call(context.Background(), "ServiceGetAnnualInspectionCity", req, &reply); err != nil {
  22. t.Error("failed to call: ", err)
  23. } else {
  24. d, _ := json.Marshal(reply)
  25. t.Log(string(d))
  26. }
  27. }
  28. func Test_ServiceGetAnnualInspectionStation(t *testing.T) {
  29. req := apis.ServiceGetAnnualInspectionStationReq{AppKey: "123456", CityName: "资阳市"}
  30. reply := apis.ServiceGetAnnualInspectionStationReply{}
  31. if err := xcli.Call(context.Background(), "ServiceGetAnnualInspectionStation", req, &reply); err != nil {
  32. t.Error("failed to call: ", err)
  33. } else {
  34. d, _ := json.Marshal(reply)
  35. t.Log(string(d))
  36. }
  37. }