package com.brilliance; import com.brilliance.swift.SwiftTransfer; import com.brilliance.swift.element2mx.Element2MxCreatorManager; import org.apache.commons.io.FileUtils; import org.junit.Test; import java.io.File; public class Element2MxTest { @Test public void test() {
//File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxCamt05300108_950.xml"));
//File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00800108.xml")); //File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108.xml"));
//File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxCamt05400108_CREDIT.xml")); //File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxCamt02900109_196.xml")); File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxCamt05600108_192.xml"));
String elementStr = SwiftTransfer.mx2Element(file); String xmlStr = new Element2MxCreatorManager().element2Mx(elementStr); System.out.println(xmlStr); } }