Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package eu.clarin.weblicht.wlfxb.io;
 
 import java.io.File;
 import org.junit.Test;

Author(s):
Yana Panchenko
public class WLDObjector3Test {
    @Rule
    public TemporaryFolder testFolder = new TemporaryFolder();
    private static final String INPUT_FILE = "/data/objector/corpus-all.xml";
    private static final String OUTPUT_FILE = "corpus-all-output.xml";
    public WLDObjector3Test() {
    }
    @Test
    public void testReadWrite() throws Exception {
        InputStream is = this.getClass().getResourceAsStream();
        WLData wld = WLDObjector.read(is);
        WLDObjector.write(wld.newFile(), false);
       
        // TODO: can use after equal methods are implemented for TCF components
        //WLData wld2 = WLDObjector.read(is2);
        //Assert.assertEquals("tcf after read->write->read should be equal", wld, wld2);
        
        InputStream is3 = this.getClass().getResourceAsStream();
        TestUtils.assertEqualXml(is3is2);
    }
New to GrepCode? Check out our FAQ X