package com.jeelowcode.test.json;

import cn.hutool.json.JSONUtil;
import com.jeelowcode.service.bpm.config.framework.portal.core.dto.ReceiveRequestInfoDTO;
import com.jeelowcode.tool.framework.common.util.json.JsonUtils;
import com.jeelowcode.tool.framework.test.core.ut.BaseMockitoUnitTest;
import org.junit.Test;

import java.util.Date;

/**
 * 描述：Json工具类测试
 *
 * @author shelly
 */
public class JsonUtilsTest extends BaseMockitoUnitTest {

    @Test
    public void testJsonToString() {
        ReceiveRequestInfoDTO requestDTO = new ReceiveRequestInfoDTO()
                .setCreateDateTime(new Date())
                .setReceiveDateTime(new Date());
        System.out.println(JsonUtils.toJsonString(requestDTO));
        System.out.println(JSONUtil.toJsonStr(requestDTO));
    }

}
