package com.eactive.eai.transformer;

import com.eactive.eai.common.util.Logger;
import com.eactive.eai.transformer.engine.TransformEngine;
import com.eactive.eai.transformer.message.Message;
import com.eactive.eai.transformer.message.MessageFactory;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;


public class LayoutBigDecimalTest extends TestCase {
	protected static Logger logger = Logger.getLogger("transformer");

	TransformEngine engine = null;
    
    
    public LayoutBigDecimalTest(String name) {
        super(name);
    }

    public static Test suite() {
        /*
        * the dynamic way
        */
        return new TestSuite(LayoutBigDecimalTest.class);
    }

    public void setUp() throws Exception {
        // 변환 초기화
        engine = TransformEngine.getInstance();

        if (!engine.isStarted()) {
            engine.start();
        } 
    }

    public void tearDown() throws Exception {
        //
    }
	public void testFindItemTest() throws Exception {
		System.out.println("find Item Test ==============================================================");
		String data ="{\"AIH_TIAS00020745_RES\":{\"PRCS_DVSN_CD\":\"1\",\"CSNO\":\"114750076\",\"ERNN\":\"005310377\",\"CUST_NM\":\"dojpNhadlZpYtVtL0uYbi+==\",\"LNNO\":\"21000000001\",\"LOAN_YMD\":\"20211013\",\"LOAN_AMT\":30000000,\"LOAN_RAMT\":30000000,\"NORM_INTR_RT\":5.0000000,\"NORM_IRRT\":5.0000000,\"ARRR_INTR_RT\":11.0000000,\"ARRR_IRRT\":11.0000000,\"APRV_BRN_NM_S40\":\"이천우체국\",\"APRV_BRN_CD\":\"100636\",\"PYMT_DD\":\"25\",\"LAST_RPAY_YMD\":\"20210925\",\"LAST_IRCL_YMD\":\"20210925\",\"LOAN_KIND_CD\":\"05\",\"RPAY_METH_CD\":\"01\",\"RPAY_DVSN_CD\":\"03\",\"LOAN_USAG_DVSN_CD\":\"02\",\"INSU_GDS_CD\":\"L300005\",\"LOAN_CTSTA_CD\":\"21\",\"BFCH_LOAN_TRM_VAL_I3\":3,\"AFCH_LOAN_TRM_VAL_I3\":4,\"BFCH_MTRY_YMD\":\"20241012\",\"AFCH_MTRY_YMD\":\"20251012\",\"WRC_NM\":\"이천설성우편취급국\",\"WRC_ADDR_REGN_NM\":\"탕판수 안충창 나눈물 창나하마 393\",\"WRC_DTL_EADR\":\"85OmeVZR8L0eZOP5FgoAlTksNYPBXS7YDQt3sNXprzY=\",\"BF_LOAN_ELDP_SRNG_ID\":20210601000000000053,\"LOAN_PSBL_YN\":\"Y\",\"BASS_RINT\":1.00000,\"LOAN_LIMT_AMT\":30000000,\"KCB_CRDT_EVTM_SCR\":900.00000,\"REPT_LIST_ROWCNT\":1,\"REPT_LIST_DATAGRID\":[{\"SLIP_CMMP1_S110\":\"\",\"RMK_CN\":\"\",\"BFCH_ADDR1_S150\":\"\",\"AFCH_ADDR1_S150\":\"\",\"BFCH_ADDR2_S150\":\"\",\"AFCH_ADDR2_S150\":\"\",\"BFCH_CUST_NM_S60\":\"dojpNhadlZpYtVtL0uYbi+==\",\"AFCH_CUST_NM_S60\":\"dojpNhadlZpYtVtL0uYbi+==\",\"BFCH_ERNN\":\"005310377\",\"AFCH_ERNN\":\"005310377\",\"BFCH_LOAN_KIND_CD_S2\":\"05\",\"AFCH_LOAN_KIND_CD_S2\":\"05\",\"BFCH_LOAN_AMT_B13\":30000000,\"AFCH_LOAN_AMT_B13\":30000000,\"BFCH_LOAN_YMD_S8\":\"20211013\",\"AFCH_LOAN_YMD_S8\":\"20211013\",\"BFCH_LOAN_TRM_VAL_I3\":3,\"AFCH_LOAN_TRM_VAL_I3\":4,\"BFCH_RPAY_METH_CD_S2\":\"01\",\"AFCH_RPAY_METH_CD_S2\":\"01\",\"BFCH_PYIN_NM_S100\":\"이자 월납 후취\",\"AFCH_PYIN_NM_S100\":\"이자 월납 후취\",\"LOAN_KIND_CD\":\"05\",\"LOAN_RAMT\":30000000,\"LOAN_INTR_ARRR_YN\":\"N\",\"ARRR_DAYS\":0,\"ISSU_YMD\":\"20211015\",\"POFC_CD\":\"012435\",\"POFC_NM\":\"서울광진우체국\"}]}}";
//		       data ="{\"AIH_TIAS00020745_RES\":{\"PRCS_DVSN_CD\":\"1\",\"CSNO\":\"114750076\",\"ERNN\":\"005310377\",\"CUST_NM\":\"dojpNhadlZpYtVtL0uYbi+==\",\"LNNO\":\"21000000001\",\"LOAN_YMD\":\"20211013\",\"LOAN_AMT\":30000000,\"LOAN_RAMT\":30000000,\"NORM_INTR_RT\":5.0000000,\"NORM_IRRT\":5.0000000,\"ARRR_INTR_RT\":11.0000000,\"ARRR_IRRT\":11.0000000,\"APRV_BRN_NM_S40\":\"이천우체국\",\"APRV_BRN_CD\":\"100636\",\"PYMT_DD\":\"25\",\"LAST_RPAY_YMD\":\"20210925\",\"LAST_IRCL_YMD\":\"20210925\",\"LOAN_KIND_CD\":\"05\",\"RPAY_METH_CD\":\"01\",\"RPAY_DVSN_CD\":\"03\",\"LOAN_USAG_DVSN_CD\":\"02\",\"INSU_GDS_CD\":\"L300005\",\"LOAN_CTSTA_CD\":\"21\",\"BFCH_LOAN_TRM_VAL_I3\":3,\"AFCH_LOAN_TRM_VAL_I3\":4,\"BFCH_MTRY_YMD\":\"20241012\",\"AFCH_MTRY_YMD\":\"20251012\",\"WRC_NM\":\"이천설성우편취급국\",\"WRC_ADDR_REGN_NM\":\"탕판수 안충창 나눈물 창나하마 393\",\"WRC_DTL_EADR\":\"85OmeVZR8L0eZOP5FgoAlTksNYPBXS7YDQt3sNXprzY=\",\"BF_LOAN_ELDP_SRNG_ID\":0,\"LOAN_PSBL_YN\":\"Y\",\"BASS_RINT\":1.00000,\"LOAN_LIMT_AMT\":30000000,\"KCB_CRDT_EVTM_SCR\":900.00000,\"REPT_LIST_ROWCNT\":1,\"REPT_LIST_DATAGRID\":[{\"SLIP_CMMP1_S110\":\"\",\"RMK_CN\":\"\",\"BFCH_ADDR1_S150\":\"\",\"AFCH_ADDR1_S150\":\"\",\"BFCH_ADDR2_S150\":\"\",\"AFCH_ADDR2_S150\":\"\",\"BFCH_CUST_NM_S60\":\"dojpNhadlZpYtVtL0uYbi+==\",\"AFCH_CUST_NM_S60\":\"dojpNhadlZpYtVtL0uYbi+==\",\"BFCH_ERNN\":\"005310377\",\"AFCH_ERNN\":\"005310377\",\"BFCH_LOAN_KIND_CD_S2\":\"05\",\"AFCH_LOAN_KIND_CD_S2\":\"05\",\"BFCH_LOAN_AMT_B13\":30000000,\"AFCH_LOAN_AMT_B13\":30000000,\"BFCH_LOAN_YMD_S8\":\"20211013\",\"AFCH_LOAN_YMD_S8\":\"20211013\",\"BFCH_LOAN_TRM_VAL_I3\":3,\"AFCH_LOAN_TRM_VAL_I3\":4,\"BFCH_RPAY_METH_CD_S2\":\"01\",\"AFCH_RPAY_METH_CD_S2\":\"01\",\"BFCH_PYIN_NM_S100\":\"이자 월납 후취\",\"AFCH_PYIN_NM_S100\":\"이자 월납 후취\",\"LOAN_KIND_CD\":\"05\",\"LOAN_RAMT\":30000000,\"LOAN_INTR_ARRR_YN\":\"N\",\"ARRR_DAYS\":0,\"ISSU_YMD\":\"20211015\",\"POFC_CD\":\"012435\",\"POFC_NM\":\"서울광진우체국\"}]}}";
		
		System.out.println(data);
		Message source = MessageFactory.getFactory().getMessage("AIH_TIAS00020745_RES");
		source.setData(data);
		System.out.println(source);

		

	} 

}
