package org.dromara.test;

import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONUtil;
import org.junit.jupiter.api.*;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * 标签单元测试案例
 *
 * @author Lion Li
 */
@SpringBootTest
@DisplayName("标签单元测试案例")
public class TagUnitTest {


    @Test
    public void testTagDev() {
//        1742313600000

        String cc = "{\n" +
            "    \"schedulInfo\": {\n" +
            "        \"id\": 1893197671453421570,\n" +
            "        \"ext1\": \"{\\\"carInfo\\\": {\\\"id\\\": 1891369958178545666, \\\"gps\\\": \\\"gps-1234567\\\", \\\"ext1\\\": \\\"{}\\\", \\\"ext2\\\": \\\"{}\\\", \\\"carZw\\\": 10, \\\"carNum\\\": \\\"苏A12345\\\", \\\"remark\\\": \\\"小面包车\\\", \\\"driverId\\\": 1}, \\\"pathInfo\\\": {\\\"id\\\": 1891369322254950401, \\\"ext1\\\": \\\"{}\\\", \\\"ext2\\\": \\\"{}\\\", \\\"name\\\": \\\"福安-松罗\\\", \\\"mtime\\\": \\\"08:36:00\\\", \\\"price\\\": 10000, \\\"remark\\\": \\\"\\\", \\\"endArea\\\": 1891367690624557058, \\\"startArea\\\": 1891367270745366530}, \\\"driverInfo\\\": {\\\"userId\\\": 1, \\\"nickName\\\": \\\"管理员测试\\\", \\\"userName\\\": \\\"admin\\\", \\\"avatarUrl\\\": \\\"http://khy.xiaole.vip/khyfile/khy/2024/10/31/aa483cca0d124fa19763c69b1c679c39.jpg\\\"}}\",\n" +
            "        \"carId\": 1891369958178545666,\n" +
            "        \"mdate\": 1742313600000,\n" +
            "        \"mtime\": \"18:36:00\",\n" +
            "        \"pathId\": 1891369322254950401,\n" +
            "        \"pprice\": 0\n" +
            "    }\n" +
            "}";


        System.out.println(JSONUtil.parseObj(cc).getJSONObject("schedulInfo").getDate("mdate"));
    }



    @Tag("prod")
    @DisplayName("测试 @Tag prod")
    @Test
    public void testTagProd() {
        System.out.println("prod");
    }

    @Tag("local")
    @DisplayName("测试 @Tag local")
    @Test
    public void testTagLocal() {
        System.out.println("local");
    }

    @Tag("exclude")
    @DisplayName("测试 @Tag exclude")
    @Test
    public void testTagExclude() {
        System.out.println("exclude");
    }

    @BeforeEach
    public void testBeforeEach() {
        System.out.println("@BeforeEach ==================");
    }

    @AfterEach
    public void testAfterEach() {
        System.out.println("@AfterEach ==================");
    }


}
