//package com.yaoyicloud.render.test;
//
//import static org.junit.Assert.assertTrue;
//import java.io.IOException;
//import java.net.URISyntaxException;
//import java.nio.file.Files;
//import java.nio.file.Path;
//import java.nio.file.Paths;
//import java.util.Map;
//
//import com.google.protobuf.util.JsonFormat;
//import com.yaoyicloud.config.FilerepoProperties;
//import org.junit.Test;
//
//import com.yaoyicloud.message.FxyProtos.Attachment;
//import com.yaoyicloud.message.FxyProtos.AttachmentSection;
//import com.yaoyicloud.render.platform.AttachmentSectionRender;
//
//import javax.annotation.Resource;
//
//public class TestAttachmentSectionRender {
//@Resource
//private FilerepoProperties filerepoProperties;
//    @Test
//    public void testRenderDocx() throws IOException, URISyntaxException {
//        Path path = Paths.get("C:\\Users\\yyy\\Desktop\\demo\\render\\easier-render\\easier-report-biz\\src\\test\\resources\\docx\\attachments.docx");
//        byte[] content = Files.readAllBytes(path);
//        AttachmentSectionRender render = new AttachmentSectionRender("../temp/",filerepoProperties);
//        AttachmentSection build = AttachmentSection.newBuilder()
//                .setSelfDeclLink("https://abc.com/111")
//                .setSelfDeclLink("https://abc.com/111")
//                .addBusinessLicenseImages(Attachment.newBuilder().setFileName("").setFileUri("https://bcd.com"))
//                .addBusinessLicenseImages(Attachment.newBuilder().setFileName("yyc_past_logo.70f2a91c.png")
//                        .setFileUri("https://pre.yaoeasier.com/assets/yyc_past_logo.70f2a91c.png"))
//                .addBusinessLicenseImages(Attachment.newBuilder().setFileName(".pdf")
//                        .setFileUri(
//                                "https://pre.yaoeasier.com/#/decl?tId=1834769374606344194&declSn=271af310f8194007b6444b13a95cf267"))
//                .build();
//        String print = JsonFormat.printer().print(build);
//        String retPath = render.renderDocx(print, Map.of(), content,"aaa");
//
//        assertTrue(retPath.length() > 0);
//    }
//
//}
