package com.brilliance.isc.convert.mt9xx;

import com.brilliance.isc.swift.objmtconvert.manager.MtCreatorManager;
import com.brilliance.isc.swift.objmtconvert.model.commontag.ActnoBicAdrTagXXX;
import com.brilliance.isc.swift.objmtconvert.model.mt9xx.MT985Creator;
import com.brilliance.isc.swift.objmtconvert.util.Constans;
import org.junit.Test;

import java.lang.reflect.InvocationTargetException;

/**
 * @author hedonghao
 * @date 2023/2/24
 */
public class Mt985Test {
    @Test
    public void test_985() throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
        // 组报文
        //57D
        ActnoBicAdrTagXXX actnoBicAdrTag57a = new ActnoBicAdrTagXXX("57");
        //actnoBicAdrTag57a.setInfo("A");
        actnoBicAdrTag57a.setAddress("WHYHCNHBXXX");
        //actnoBicAdrTag57a.setCode("THISIS41A");
        //actnoBicAdrTag57a.setBic("ASDFQW11");
        //actnoBicAdrTag57a.setAcctno("6226TEST0001");
        actnoBicAdrTag57a.setPartyIdentifier("1234-5678");
        //actnoBicAdrTag57a.setLocation("WHYHCNHBXXX");

        ActnoBicAdrTagXXX actnoBicAdrTag59=new ActnoBicAdrTagXXX("59");
        //actnoBicAdrTag59.setInfo("A");
        actnoBicAdrTag59.setAddress("WHYHCNHBXXX");
        //actnoBicAdrTag59.setCode("THISIS411");
        //actnoBicAdrTag59.setBic("THISIS41A");
        actnoBicAdrTag59.setAcctno("6226TEST0001");
        //actnoBicAdrTag59.setPartyIdentifier("1234-5678");
        //actnoBicAdrTag59.setLocation("WHYHCNHBXXX");

        //构造参数传入MT报文类型
        MT985Creator mt985Creator=new MT985Creator("985");
       // mt985Creator.setMsgType("985");
        mt985Creator.setSendBic("PSBCCNBJXXX");
        mt985Creator.setRecvBic("CIPSCNSHXXX");
        mt985Creator.setTranReferenceNum("123456789CIPSCN");
        mt985Creator.setEnquiredParty59(actnoBicAdrTag59);
        mt985Creator.setQueries("666666666635x"+ Constans.CRLF+"666666666635x");
        mt985Creator.setAccountWithInstitution57a(actnoBicAdrTag57a);

        MtCreatorManager.packMT(mt985Creator);

    }

    @Test
    public void test_985_2() throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
        // 组报文
        //57A
        ActnoBicAdrTagXXX actnoBicAdrTag57a = new ActnoBicAdrTagXXX("57");
        //actnoBicAdrTag57a.setInfo("A");
        //actnoBicAdrTag57a.setAddress("WHYHCNHBXXX");
        //actnoBicAdrTag57a.setCode("THISIS41A");
        actnoBicAdrTag57a.setBic("ASDFQW11");
        //actnoBicAdrTag57a.setAcctno("6226TEST0001");
        actnoBicAdrTag57a.setPartyIdentifier("1234-5678");
        //actnoBicAdrTag57a.setLocation("WHYHCNHBXXX");

        ActnoBicAdrTagXXX actnoBicAdrTag59=new ActnoBicAdrTagXXX("59");
        //actnoBicAdrTag59.setInfo("A");
        actnoBicAdrTag59.setAddress("WHYHCNHBXXX");
        //actnoBicAdrTag59.setCode("THISIS411");
        //actnoBicAdrTag59.setBic("THISIS41A");
        actnoBicAdrTag59.setAcctno("6226TEST0001");
        //actnoBicAdrTag59.setPartyIdentifier("1234-5678");
        //actnoBicAdrTag59.setLocation("WHYHCNHBXXX");

        //构造参数传入MT报文类型
        MT985Creator mt985Creator=new MT985Creator("985");
        // mt985Creator.setMsgType("985");
        mt985Creator.setSendBic("PSBCCNBJXXX");
        mt985Creator.setRecvBic("CIPSCNSHXXX");
        mt985Creator.setTranReferenceNum("123456789CIPSCN");
        mt985Creator.setEnquiredParty59(actnoBicAdrTag59);
        mt985Creator.setQueries("666666666635x"+ Constans.CRLF+"666666666635x");
        mt985Creator.setAccountWithInstitution57a(actnoBicAdrTag57a);

        MtCreatorManager.packMT(mt985Creator);

    }

    @Test
    public void test_985_3() throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
        // 组报文
        //57B
        ActnoBicAdrTagXXX actnoBicAdrTag57a = new ActnoBicAdrTagXXX("57");
        //actnoBicAdrTag57a.setInfo("A");
        //actnoBicAdrTag57a.setAddress("WHYHCNHBXXX");
        //actnoBicAdrTag57a.setCode("THISIS41A");
        //actnoBicAdrTag57a.setBic("ASDFQW11");
        //actnoBicAdrTag57a.setAcctno("6226TEST0001");
        actnoBicAdrTag57a.setPartyIdentifier("1234-5678");
        actnoBicAdrTag57a.setLocation("WHYHCNHBXXX");

        ActnoBicAdrTagXXX actnoBicAdrTag59=new ActnoBicAdrTagXXX("59");
        //actnoBicAdrTag59.setInfo("A");
        actnoBicAdrTag59.setAddress("WHYHCNHBXXX");
        //actnoBicAdrTag59.setCode("THISIS411");
        //actnoBicAdrTag59.setBic("THISIS41A");
        actnoBicAdrTag59.setAcctno("6226TEST0001");
        //actnoBicAdrTag59.setPartyIdentifier("1234-5678");
        //actnoBicAdrTag59.setLocation("WHYHCNHBXXX");

        //构造参数传入MT报文类型
        MT985Creator mt985Creator=new MT985Creator("985");
        // mt985Creator.setMsgType("985");
        mt985Creator.setSendBic("PSBCCNBJXXX");
        mt985Creator.setRecvBic("CIPSCNSHXXX");
        mt985Creator.setTranReferenceNum("123456789CIPSCN");
        mt985Creator.setEnquiredParty59(actnoBicAdrTag59);
        mt985Creator.setQueries("666666666635x"+ Constans.CRLF+"666666666635x");
        mt985Creator.setAccountWithInstitution57a(actnoBicAdrTag57a);

        MtCreatorManager.packMT(mt985Creator);

    }

}
