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

import org.junit.Assert;
import org.junit.Test;

public class ReportModelVODefaultDisplayTest {

    @Test
    public void stringFieldsUseDashWhenValueMissing() {
        ReportModelVO vo = new ReportModelVO();
        vo.setCheckerName("   ");
        vo.setCheckResult(null);
        vo.setEditorName("");
        vo.setUpdateBy("  ");
        vo.setFileName(null);

        Assert.assertEquals("-", vo.getCheckerName());
        Assert.assertEquals("-", vo.getCheckResult());
        Assert.assertEquals("-", vo.getEditorName());
        Assert.assertEquals("-", vo.getUpdateBy());
        Assert.assertEquals("-", vo.getFileName());
    }

    @Test
    public void stringFieldsKeepOriginalTextWhenValuePresent() {
        ReportModelVO vo = new ReportModelVO();
        vo.setCheckerName("审核人A");
        vo.setCheckResult("审核通过");

        Assert.assertEquals("审核人A", vo.getCheckerName());
        Assert.assertEquals("审核通过", vo.getCheckResult());
    }
}
