All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jvnet.jaxbcommons.extendedcloneable.addon.tests.RoundtripTest Maven / Gradle / Ivy

There is a newer version: 1.0.4.7
Show newest version
package org.jvnet.jaxbcommons.extendedcloneable.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