package com.brilliance.isc.convert.mt7xx;

import com.brilliance.isc.swift.objmtconvert.manager.MtCreatorManager;
import com.brilliance.isc.swift.objmtconvert.model.mt7xx.MT708Creator;
import org.junit.Test;

/**
 * @author wuzhe
 * @date 2023/02/27
 */
public class MT708Test {

    @Test
    public void mt708_Test(){

        MT708Creator mt708Creator=new MT708Creator("708");
        mt708Creator.setSendBic("PSBCCNBJXXX");//发报行
        mt708Creator.setRecvBic("CIPSCNSHXXX");//收报行
        //27 1!n/1!n
        mt708Creator.setSequenceofTotal("1/1");
        //20 16x
        mt708Creator.setSenderReference("OVFMEEDFGBD");
        //21 16x
        mt708Creator.setReceiverReference("SFVBTERFGBNHT");
        //23 16x
        mt708Creator.setIssuingBankReference("DBNHYTGFDSBF");
        //26E 3n
        mt708Creator.setNumberofAmendment("708");
        //30 6!n
        mt708Creator.setDateofAmendment("230227");

        //非必选项
        //45B 100*65z
        mt708Creator.setDescriptionofGoodsServices("ERFD\r\nRETNTR");
        //46B 100*65z
        mt708Creator.setDocumentsRequired("UMYT\r\nRGBRE");
        //47B 100*65z
        mt708Creator.setAdditionalConditions("RGFDERFG\r\nBGERR");
        //49M 100*65z
        mt708Creator.setSpecialPaymentConditionsforBeneficiary("MYNTBRV");
        //49N 100*65z
        mt708Creator.setSpecialPaymentConditionsforBankOnly("RBNMNTV");


        MtCreatorManager.packMT(mt708Creator);
    }

    @Test
    public void mt708_Test2(){

        MT708Creator mt708Creator=new MT708Creator("708");
        mt708Creator.setSendBic("PSBCCNBJXXX");//发报行
        mt708Creator.setRecvBic("CIPSCNSHXXX");//收报行
        //27 1!n/1!n
        mt708Creator.setSequenceofTotal("1/1");
        //20 16x
        mt708Creator.setSenderReference("OVFMEEDFGBD");
        //21 16x
        mt708Creator.setReceiverReference("SFVBTERFGBNHT");
        //23 16x
        mt708Creator.setIssuingBankReference("DBNHYTGFDSBF");
        //26E 3n
        mt708Creator.setNumberofAmendment("708");
        //30 6!n
        mt708Creator.setDateofAmendment("230227");

        //非必选项
        //45B 100*65z
        mt708Creator.setDescriptionofGoodsServices("ERFD\r\nRETNTR");
        //46B 100*65z
        mt708Creator.setDocumentsRequired("UMYT\r\nRGBRE");
        //47B 100*65z
        mt708Creator.setAdditionalConditions("RGFDERFG\r\nBGERR");
        //49M 100*65z
        mt708Creator.setSpecialPaymentConditionsforBeneficiary("MYNTBRV");
        //49N 100*65z
        mt708Creator.setSpecialPaymentConditionsforBankOnly("RBNMNTV");


        MtCreatorManager.packMT(mt708Creator);
    }
}

