package com.njcn.gather.aireport.reportmodel.pojo.vo;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Assert;
import org.junit.Test;

import java.time.LocalDateTime;

public class ReportModelVOTimeFormatTest {

    @Test
    public void timeJsonUsesStandardTwentyFourHourFormat() throws Exception {
        ReportModelVO vo = new ReportModelVO();
        vo.setCreateTime(LocalDateTime.of(2026, 6, 25, 13, 19, 25));
        vo.setUpdateTime(LocalDateTime.of(2026, 6, 25, 13, 20, 41));

        String json = new ObjectMapper().writeValueAsString(vo);

        Assert.assertTrue(json.contains("\"createTime\":\"2026-06-25 13:19:25\""));
        Assert.assertTrue(json.contains("\"updateTime\":\"2026-06-25 13:20:41\""));
        Assert.assertFalse(json.contains("2026-06-25T13"));
    }
}
