package sample; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.StringReader; import junit.framework.TestCase; import org.exolab.castor.mapping.Mapping; import org.exolab.castor.mapping.MappingException; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Unmarshaller; import org.exolab.castor.xml.ValidationException; import org.xml.sax.InputSource; public class CastorCompatibilityTest extends TestCase { public CastorCompatibilityTest(String s) { super(s); } public void testCompatibility() throws IOException, MarshalException, ValidationException, MappingException { Mapping mapping = new Mapping(); File f = new File("sample/mapping.xml"); mapping.loadMapping(new InputSource(new FileReader(f))); Unmarshaller m = new Unmarshaller(mapping); String s = ""; m.unmarshal(new InputSource(new StringReader(s))); String s2 = ""; m.unmarshal(new InputSource(new StringReader(s2))); } }