package com.brilliance.isc.convert.mt9xx;

import com.brilliance.isc.swift.objmtconvert.manager.MtCreatorManager;
import com.brilliance.isc.swift.objmtconvert.model.mt9xx.MT935Creator;
import com.brilliance.isc.swift.objmtconvert.model.mt9xx.mt9XXAbsCreator.MT935AbsCreator;
import org.junit.Test;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

public class MT935Test {
    @Test
    public void MT935_Test() {
        MT935Creator mt935Creator = new MT935Creator("935");
        //20
        mt935Creator.setTransactionReferenceNumber("98031645");
        //72
        mt935Creator.setSenderReceiverInfo("/COMM/USD15,");
        //循环域
        List<MT935AbsCreator> list = new ArrayList<>();
        MT935AbsCreator mt935AbsCreator1 = new MT935AbsCreator();
        //23
        mt935AbsCreator1.setFurtherIdentification("USDPRIME");
        //25
        mt935AbsCreator1.setAccountIdentification("9-9876543");
        //30
        mt935AbsCreator1.setEffectiveDateOfNewRate("201231");
        //37H
        List<String> newInsertDateList1 = new LinkedList<>();
        newInsertDateList1.add("D9,75");
        newInsertDateList1.add("C10,75");
        newInsertDateList1.add("RC10,75");
        mt935AbsCreator1.setNewInterestRate(newInsertDateList1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);

        mt935Creator.setMt935AbsCreators(list);

        MtCreatorManager.packMT(mt935Creator);
    }
    @Test
    public void MT935_Test_2() {
        MT935Creator mt935Creator = new MT935Creator("935");
        //20
        mt935Creator.setTransactionReferenceNumber("98031645");
        //72
        mt935Creator.setSenderReceiverInfo("/COMM/USD15,");
        //循环域
        List<MT935AbsCreator> list = new ArrayList<>();
        MT935AbsCreator mt935AbsCreator1 = new MT935AbsCreator();
        //23
        mt935AbsCreator1.setFurtherIdentification("USDPRIME");
        //25
        mt935AbsCreator1.setAccountIdentification("9-9876543AAAAAAA");
        //30
        mt935AbsCreator1.setEffectiveDateOfNewRate("201231AAAAAAA");
        //37H
        List<String> newInsertDateList1 = new LinkedList<>();
        newInsertDateList1.add("D9,75AAAAAAA");
        newInsertDateList1.add("C10,75");
        newInsertDateList1.add("RC10,75");
        mt935AbsCreator1.setNewInterestRate(newInsertDateList1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);

        mt935Creator.setMt935AbsCreators(list);

        MtCreatorManager.packMT(mt935Creator);
    }
    @Test
    public void MT935_Test_3() {
        MT935Creator mt935Creator = new MT935Creator("935");
        //20
        mt935Creator.setTransactionReferenceNumber("98031645");
        //72
        mt935Creator.setSenderReceiverInfo("/COMM/USD15,");
        //循环域
        List<MT935AbsCreator> list = new ArrayList<>();
        MT935AbsCreator mt935AbsCreator1 = new MT935AbsCreator();
        //30
        mt935AbsCreator1.setEffectiveDateOfNewRate("201231");
        //37H
        List<String> newInsertDateList1 = new LinkedList<>();
        newInsertDateList1.add("D9,75");
        newInsertDateList1.add("C10,75");
        newInsertDateList1.add("RC10,75");
        mt935AbsCreator1.setNewInterestRate(newInsertDateList1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);
        list.add(mt935AbsCreator1);

        mt935Creator.setMt935AbsCreators(list);

        MtCreatorManager.packMT(mt935Creator);
    }
}
