package com.brilliance.isc.convert.mt1xx;

import com.brilliance.isc.swift.objmtconvert.manager.MtCreatorManager;
import com.brilliance.isc.swift.objmtconvert.model.commontag.ActnoBicAdrTagXXX;
import com.brilliance.isc.swift.objmtconvert.model.commontag.DcDateCurAmtTagXXX;
import com.brilliance.isc.swift.objmtconvert.model.mt1xx.MT105Creator;
import com.brilliance.isc.swift.objmtconvert.model.mt1xx.MT191Creator;
import com.brilliance.isc.swift.objmtconvert.result.MtResult;
import com.brilliance.isc.swift.objmtconvert.util.JsonUtil;
import org.junit.Test;

import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.Map;

public class Mt105Test {


    @Test
    public void mt105_Test()throws Exception {
        /*Map map = new HashMap();
        map.put("msgType", "105");//报文类型
        map.put("recvBic","CIPSCNSHXXX");//收报行
        map.put("sendBic","PSBCCNBJXXX");//发报行
        map.put("SubMessageType","SubMessageType");//12
        map.put("TransactionReferenceNumber","TransactionReferenceNumber");//20
        map.put("RelatedReference","RelatedReference");//21
        map.put("SequenceofTotal","SequenceofTotal");//27
        map.put("EDIFACTMessage","EDIFACTMessage");//77F*/

        MT105Creator mt105Creator=new MT105Creator("105");
        mt105Creator.setSendBic("PSBCCNBJXXX");
        mt105Creator.setRecvBic("CIPSCNSHXXX");
        mt105Creator.setTransactionReferenceNumber("RelatedReference");
        mt105Creator.setRelatedReference("RelatedReference");
        mt105Creator.setSubMessageType("381");
        mt105Creator.setSequenceofTotal("2/3");
        mt105Creator.setEdifactMessage("123ASD");


        //String json = JsonUtil.toJson(map);

        /********以上为json参数**************/

//        MtResult mtResult = MtCreatorManager.pack(mt105Creator);
//        if (mtResult.isSuccess())
//            System.out.println(mtResult.getMessage());
//        else
//            System.out.println(mtResult.getDsp());

        MtCreatorManager.packMT(mt105Creator);
    }




}
