添加详细流水标签日志说明文档记录项目
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
package com.ruoyi.ccdi.project.mapper;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.xml.sax.InputSource;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import java.io.StringReader;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
@@ -39,6 +42,15 @@ class CcdiBankTagAnalysisMapperXmlTest {
|
||||
assertTrue(xml.contains("selectLargeTransferStatements"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void analysisMapperXml_shouldBeWellFormed() throws Exception {
|
||||
String xml = readXml(RESOURCE);
|
||||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
factory.setNamespaceAware(false);
|
||||
factory.setValidating(false);
|
||||
factory.newDocumentBuilder().parse(new InputSource(new StringReader(xml)));
|
||||
}
|
||||
|
||||
private String readXml(String resource) throws Exception {
|
||||
try (InputStream inputStream = getClass().getClassLoader().getResourceAsStream(resource)) {
|
||||
return new String(inputStream.readAllBytes(), StandardCharsets.UTF_8);
|
||||
|
||||
Reference in New Issue
Block a user