//package com.yaoyicloud.render.test;
//
//import static org.junit.Assert.assertTrue;
//import java.io.IOException;
//import java.nio.file.Files;
//import java.nio.file.Paths;
//import java.util.Map;
//
//import org.junit.Test;
//
//import com.yaoyicloud.message.FxyProtos.CheckItemDetail;
//import com.yaoyicloud.message.FxyProtos.CheckSummary;
//import com.yaoyicloud.message.FxyProtos.FinancialData;
//import com.yaoyicloud.message.FxyProtos.FinancialIndicator;
//import com.yaoyicloud.message.FxyProtos.FinancialInfo;
//import com.yaoyicloud.render.platform.FinancialInfoRender;
//
//import javax.annotation.Resource;
//
//public class TestFinancialInfoRender {
//
//    @Resource
//
//    @Test
//    public void testRenderDocx() throws IOException {
//
//        byte[] content = Files
//            .readAllBytes(Paths.get(getClass().getClassLoader().getResource("docx/finance.docx").getFile()));
//        FinancialInfoRender render = new FinancialInfoRender("../temp/");
//        FinancialInfo.newBuilder().setNeProfit("20").addYears("2024").addYears("2023").addYears("2022")
//                .setOperatingRevenue("999")
//                .setFinancialSummary(CheckSummary.newBuilder().setRiskSummary("high risk").setSuggestion("accept it"))
//                .addIndicators(
//                        FinancialIndicator.newBuilder().setCategory("cate1").setIndicatorName("name1").addValues("13")
//                                .addValues("14").addValues("15").setFormula("magic"))
//                .addFinancialDataSeq(FinancialData.newBuilder().setFixedAsset("1000").build())
//                .addFinancialCheckDetails(CheckItemDetail.newBuilder().setCategory("cate1").setName("n2")
//                        .setResult("r1").setScore(0).setReviewResult("rr1").setReviewScore(0).setRank(1))
//                .addFinancialCheckDetails(CheckItemDetail.newBuilder().setCategory("cate2").setName("n3")
//                        .setResult("r1").setScore(0).setReviewResult("rr1").setReviewScore(0).setRank(2))
//                .addFinancialCheckDetails(CheckItemDetail.newBuilder().setCategory("cate1").setName("n1")
//                        .setResult("r1").setScore(0).setReviewResult("rr1").setReviewScore(0).setRank(0))
//                .build()
//        String retPath = render.renderDocx(
//           ,
//            Map.of(),
//            content);
//
//        assertTrue(retPath.length() > 0);
//    }
//}
