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 LayoutGISUTest extends TestCase {
	protected static Logger logger = Logger.getLogger("transformer");

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

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

    public void setUp() throws Exception {
    	AllTests.setParams();
        // 
        engine = TransformEngine.getInstance();

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

    public void tearDown() throws Exception {
        //
    }
	public void testFindItemTest() throws Exception {
		System.out.println("find Item Test ==============================================================");
		Message source = MessageFactory.getFactory().getMessage("ADC_TDAS00020504_RES");
		String data ="{\"ADC_TDAS00020504_RES\":{\"FND_SEAC_PRCS_DVSN_CD\":\"01\",\"FND_SEAC_DVSN_CD\":\"01\",\"REIV_YMD\":\"20210902\",\"NTRM_SEAC_YMD\":\"20220901\",\"BFTX_DTPF_AMT\":1234.000,\"SELL_DTPF_AMT\":1234.000,\"USEL_DTPF_AMT\":0.000,\"TOTL_STNG_QTY\":0.00000,\"SELL_QTY\":0.00000,\"USEL_QTY\":0.00000,\"SEAC_CRTR_PRIC\":1211.38167025173000,\"SEAC_STDS_CRTR_PRIC\":1019.91577183205000,\"NRSD_SEAC_STDS_CRTR_PRIC\":1019.91577183205000,\"DBDN_CRTR_PRIC\":1211.29205988,\"DBDN_STDS_CRTR_PRIC\":1019.91577183,\"NRSD_DBDN_STDS_CRTR_PRIC\":1019.91577183,\"DTPF_RT\":0.00896103717300,\"TAXT_DSBT_RT\":0.00000000020500,\"NRSD_TAXT_DSBT_RT\":0.00000000020500,\"REIV_CRTR_PRIC\":0.00000000000000,\"REIV_STDS_CRTR_PRIC\":0.00000000000000,\"NRSD_REIV_STDS_CRTR_PRIC\":0.00000000}}";
		source.setData(data);
		System.out.println(source); 
		System.out.println(source.getData()); 

		

	} 
    
}
