query_test.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package query
  2. import (
  3. "context"
  4. "gd_service/apis"
  5. "encoding/json"
  6. "testing"
  7. )
  8. func Test_ServiceGetWashingVehicleIndex(t *testing.T) {
  9. req := apis.ServiceGetWashingVehicleIndexReq{AppKey: "111", ProvinceName: "北京市", RegionName: "北京市"}
  10. reply := apis.ServiceGetWashingVehicleIndexReply{}
  11. if err := xcli.Call(context.Background(), "ServiceGetWashingVehicleIndex", 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. /*
  19. func Test_ServiceGetValuation(t *testing.T) {
  20. req := apis.ServiceGetValuationReq{PlateNo: "川A33E22", UtStyleId: 1134718, Mile: "30", Zone: "ii成都市", AppKey: "111", RegDate: "2018-10-01"}
  21. reply := apis.ServiceGetValuationReply{}
  22. if err := xcli.Call(context.Background(), "ServiceGetValuation", req, &reply); err != nil {
  23. t.Error("failed to call: ", err)
  24. } else {
  25. d, _ := json.Marshal(reply)
  26. t.Log(string(d))
  27. }
  28. }
  29. */
  30. /*
  31. func Test_ServiceGetViolation(t *testing.T) {
  32. req := apis.ServiceGetViolationReq{PlateNo:"川A33E22",PlateType:"02",Vin:"LFV2B25G6J5028435",EngineNo:"U37671",AppKey:"123456"}
  33. req := apis.ServiceGetViolationReq{PlateNo:"川Q6005X",PlateType:"02",Vin:"LSGLP83X8HF083187",EngineNo:"163540027",AppKey:"123456"}
  34. reply := apis.ServiceGetViolationReply{}
  35. if err := xcli.Call(context.Background(), "ServiceGetViolation", req, &reply); err != nil {
  36. t.Error("failed to call: ", err)
  37. } else {
  38. d, _ := json.Marshal(reply)
  39. t.Log(string(d))
  40. }
  41. }
  42. */