package com.brilliance.isc.convert.mt2xx;

import com.brilliance.isc.swift.objmtconvert.manager.MtCreatorManager;
import com.brilliance.isc.swift.objmtconvert.model.mt2xx.MT292Creator;
import com.brilliance.isc.swift.objmtconvert.result.MtResult;
import com.brilliance.isc.swift.objmtconvert.util.Constans;
import org.junit.Test;

/**
 * @Description：mt292test
 * @Author：夏猛
 * @CreateTime：2023/2/28 15:21
 **/
public class MT292Test {
    @Test
    public void mt292_Test(){
    //构造参数传入MT报文类型
    MT292Creator mt292Creator=new MT292Creator("292");
        mt292Creator.setSendBic("PSBCCNBJXXX");
        mt292Creator.setRecvBic("CIPSCNSHXXX");
        mt292Creator.setTransactionReferenceNumber("111111");   //20 16x
        mt292Creator.setRelatedReference("222222");             //21 16x
        //11S 3!n<crlf>6!n<crlf>[4!n6!n]
        mt292Creator.setMTandDateoftheOriginalMessage("123\n123456\n1234567890");
        mt292Creator.setNarrativeDescriptionoftheOriginalMessage("message"+ Constans.CRLF+"RemittanceInformation");  //79 35*50x
      //  mt292Creator.setCopyofatleasttheMandatoryFieldsoftheOriginalMessage("copy fields");  //Copy of fields

    MtResult mtResult = MtCreatorManager.packMT(mt292Creator);

}

    @Test
    public void mt29202_Test(){
        //构造参数传入MT报文类型
        MT292Creator mt292Creator=new MT292Creator("292");
        mt292Creator.setSendBic("PSBCCNBJXXX");
        mt292Creator.setRecvBic("CIPSCNSHXXX");
        mt292Creator.setTransactionReferenceNumber("info");   //20 16x
        mt292Creator.setRelatedReference("info");             //21 16x
        //11S 3!n<crlf>6!n<crlf>[4!n6!n]
        mt292Creator.setMTandDateoftheOriginalMessage("123\n123456\n1234567890");
        mt292Creator.setNarrativeDescriptionoftheOriginalMessage("info"+ Constans.CRLF+"RemittanceInformation");  //79 35*50x
        //  mt292Creator.setCopyofatleasttheMandatoryFieldsoftheOriginalMessage("copy fields");  //Copy of fields

        MtResult mtResult = MtCreatorManager.packMT(mt292Creator);

    }
}
