package com.brilliance.isc.convert.mt2xx;

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

/**
 * @Description：mt296test
 * @Author：夏猛
 * @CreateTime：2023/2/28 15:21
 **/
public class MT296Test {
    @Test
    public void mt296_Test(){
    //构造参数传入MT报文类型
    MT296Creator mt296Creator=new MT296Creator("296");
        mt296Creator.setSendBic("PSBCCNBJXXX");
        mt296Creator.setRecvBic("CIPSCNSHXXX");
        mt296Creator.setTransactionReferenceNumber("111111");   //20 16x
        mt296Creator.setRelatedReference("rr222222");             //21 16x
        mt296Creator.setAnswers("an333333"+ Constans.CRLF+"RemittanceInformation");             //76 6*35x
        mt296Creator.setNarrative("na444444"+ Constans.CRLF+"RemittanceInformation");             //77A 20*35x
        //11R 3!n<crlf>6!n<crlf>[4!n6!n]
        mt296Creator.setMTandDateoftheOriginalMessage("123\n123456\n1234567890");
        //79 35*50x
        mt296Creator.setNarrativeDescriptionoftheOriginalMessagetoWhichtheAnswerRelates("na444444"+ Constans.CRLF+"RemittanceInformation");
       // mt296Creator.setCopyofatleasttheMandatoryFieldsoftheOriginalMessage("copyfields");  //Copy of fields


    MtResult mtResult = MtCreatorManager.packMT(mt296Creator);

}

    @Test
    public void mt29602_Test(){
        //构造参数传入MT报文类型
        MT296Creator mt296Creator=new MT296Creator("296");
        mt296Creator.setSendBic("PSBCCNBJXXX");
        mt296Creator.setRecvBic("CIPSCNSHXXX");
        mt296Creator.setTransactionReferenceNumber("info");   //20 16x
        mt296Creator.setRelatedReference("info");             //21 16x
        mt296Creator.setAnswers("info"+ Constans.CRLF+"RemittanceInformation");             //76 6*35x
        mt296Creator.setNarrative("info"+ Constans.CRLF+"RemittanceInformation");             //77A 20*35x
        //11R 3!n<crlf>6!n<crlf>[4!n6!n]
        mt296Creator.setMTandDateoftheOriginalMessage("123\n123456\n1234567890");
        //79 35*50x
        mt296Creator.setNarrativeDescriptionoftheOriginalMessagetoWhichtheAnswerRelates("info"+ Constans.CRLF+"RemittanceInformation");
        // mt296Creator.setCopyofatleasttheMandatoryFieldsoftheOriginalMessage("copyfields");  //Copy of fields


        MtResult mtResult = MtCreatorManager.packMT(mt296Creator);

    }
}
