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

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

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

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

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

    public void tearDown() throws Exception {
        //
    }

	public void atestVbytes1() throws Exception {
		System.out.println("Vbytes 정상==============================================================");
		Message source = MessageFactory.getFactory().getMessage("EAI_TST0200101_REQ1");
	        
        byte[] data = "code002tracetracebiz01biz0200003123443211234432112344321".getBytes();
	        
	    source.setData(data);
	    System.out.println(source);
	} 
	public void testVbytes2() throws Exception {
		System.out.println("Vbytes 가변그리드==============================================================");
		Message source = MessageFactory.getFactory().getMessage("EAI_TST0200101_REQ1");
		
		byte[] data = "code002tracetracebiz01biz0200003".getBytes();
		
		source.setData(data);
		System.out.println(source);
	} 


    
}
