Element2MxTest.java 1.07 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
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() {
14
        //File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxCamt05300108_950.xml"));
15 16
        //File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00800108.xml"));
        //File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108.xml"));
17 18 19
        //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"));
20 21 22 23 24 25
        String elementStr = SwiftTransfer.mx2Element(file);

        String xmlStr = new Element2MxCreatorManager().element2Mx(elementStr);
        System.out.println(xmlStr);
    }
}