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

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

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

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

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

    public void tearDown() throws Exception {
        //
    }

  public void testFlatGenerate() throws Exception {
	  		System.out.println("Flat  ==============================================================");
            //----------------------------------------------------------------------
            // source message 
            //----------------------------------------------------------------------
        	String data ="TTL..3ROW11ROW122GRD11GRD12GRD21GRD22ROW21ROW221GRD31GRD32ROW31ROW323GRD41GRD42GRD51GRD52GRD61GRD62";
            Message source = MessageFactory.getFactory().getMessage("EAI_UJSON2DEPTH3_REQ1");
            source.setData(data.getBytes());
            System.out.println(source);
        }        
    
    
}
