package com.tax.zone.web.controller.test;

import com.yxcheng.token.utils.HttpHelper;
import com.yxcheng.token.utils.JSONHelper;
import com.yxcheng.token.utils.ResponseContent;
import org.junit.jupiter.api.Test;

import java.util.HashMap;
import java.util.Map;

public class ZoneTest {

    static String host = "http://localhost:8766";

    @Test
    public void testFindAllZoneList() throws Exception {
        String url = host + "/client/findAllZoneList";

        Map<String, Object> paramsMap = new HashMap<String, Object>();
        paramsMap.put("zoneType", "1");
        System.out.println(url);
        ResponseContent ret = HttpHelper.postJsonEntity(url, JSONHelper.map2json(paramsMap));
        System.out.println(ret.getContent());
    }

    @Test
    public void testHeartbeat() throws Exception {
        String url = host + "/client/heartbeat";
        System.out.println(url);
        ResponseContent ret = HttpHelper.getUrlRespContent(url);
        System.out.println(ret.getContent());
    }
}
