org.jvnet.jaxbcommons.cloneable.addon.tests.RoundtripTest Maven / Gradle / Ivy
package org.jvnet.jaxbcommons.cloneable.addon.tests;
import java.io.File;
import javax.xml.bind.JAXBContext;
import junit.framework.Assert;
import org.jvnet.jaxbcommons.lang.Cloneable;
import org.jvnet.jaxbcommons.tests.AbstractSamplesTest;
public abstract class RoundtripTest extends AbstractSamplesTest {
protected void checkSample(JAXBContext context, File sample) throws Exception {
final Cloneable source = (Cloneable) context.createUnmarshaller().unmarshal(sample);
final Object result = source.clone();
Assert.assertEquals("Structures must be identical.", source, result);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy