Package org.apache.stratum.xo.liveobject

Source Code of org.apache.stratum.xo.liveobject.TestLiveObjectMapper

package org.apache.stratum.xo.liveobject;

import java.io.File;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

import org.apache.stratum.xo.Mapper;

public class TestLiveObjectMapper
    extends TestCase
{
    private static String TEST_DOCUMENT =
        "src/test/org/apache/stratum/xo/liveobject/pipelines.xml";
       
    public TestLiveObjectMapper(String testName)
    {
        super(testName);
    }

    public static Test suite()
    {
        return new TestSuite(TestLiveObjectMapper.class);
    }

    public void setUp()
    {
    }
  
    public void tearDown()
    {
    }

    public void testLiveObjectMapping()
    {
        try
        {
            Mapper m = new Mapper();
            m.setDebug(true);
            Turbine t = new Turbine();
            t = (Turbine) m.map(new File(TEST_DOCUMENT), t);
           
            assertEquals("turbine-classic-pipeline.xml",t.getPipelineDescriptor(0));
            assertEquals("turbine-direct-pipeline.xml",t.getPipelineDescriptor(1));
        }           
        catch (Exception e)
        {
            e.printStackTrace();
            fail(e.getMessage());
        }
    }
}
TOP

Related Classes of org.apache.stratum.xo.liveobject.TestLiveObjectMapper

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.