123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- // Copyright 2019 getensh.com. All rights reserved.
- // Use of this source code is governed by getensh.com.
- package tests
- import (
- "context"
- "testing"
- v1 "adm-data/pb/v1"
- jsoniter "github.com/json-iterator/go"
- )
- var json = jsoniter.ConfigCompatibleWithStandardLibrary
- func TestQuery(t *testing.T) {
- req := v1.QueryRequest{
- Code: "U01",
- // Params: `{"vin": "MS1SEJSB15T1C15","model_no": "","long":0,"brand_name":""}`,
- // Params: `{
- // "list": [{"third_style_id": "AF0C1H3420T8A25", "source": "1"}, {"third_style_id": "AF0C1H3420T8A15", "source": "1"}, {"third_style_id": "AF0C1H3420T8A45", "source": "1"}]
- // }`,
- /*Params: `{
- "vin": "",
- "model_no": "JX1033TSE4",
- "displacement": 0,
- "displacement_l": "1.6",
- "vehicle_body_color":"",
- "vehicle_body_color_detail":"欧曼蓝金属漆",
- "vehicle_type":"K33",
- "initial_registration_date":"",
- "insurance_first_date":"2010-12-22",
- "use_property":"A",
- "approved_number":5,
- "state":"A",
- "compulsory_scrap_to":"",
- "plate_type":"02",
- "long":"4999",
- "approved_number":"1",
- "grossMass":"400",
- "inspection_result_effective_to":""
- }`,*/
- Params: `{
- "vin": "LVVDG17BXJD627878",
- "plate_type": "02",
- "emission_standard":"GB18352.3-2005(国V阶段)",
- "last_compulsory_insurance_date":"2021-02"
- }`,
- // "vehicle_type": "K33",
- // "vehicle_type_detail": "",
- // "fuel_type": "A",
- // "fuel_type_detail": "",
- // "plate_type": "",
- // "plate_type_detail":"小型汽车"
- }
- reply, err := client.Query(context.Background(), &req)
- if err != nil {
- t.Fatal(err)
- } else {
- s, _ := json.MarshalToString(reply)
- t.Log(s)
- }
- }
|