Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package eu.clarin.weblicht.wlfxb.tc.test;
 
 import java.io.*;

Author(s):
akislev
public abstract class AbstractTextCorpusTest {
    protected TextCorpus read(String fileEnumSet<TextCorpusLayerTaglayersToReadthrows Exception {
        InputStream is = this.getClass().getResourceAsStream(file);
        TextCorpusStreamed tc = new TextCorpusStreamed(islayersToRead);
        tc.close();
        ..println(tc);
        return tc;
    }
    protected TextCorpusStreamed open(String inputResourceString outputFileEnumSet<TextCorpusLayerTaglayersToReadthrows FileNotFoundExceptionWLFormatException {
        InputStream is = this.getClass().getResourceAsStream(inputResource);
        Assert.assertNotNull("can't open input resource"is);
        OutputStream os = new FileOutputStream(outputFile);
        Assert.assertNotNull("can't open output file"os);
        return new TextCorpusStreamed(islayersToReadosfalse);
    }
    protected void assertEqualXml(String expectedOutputResourceString outputFilethrows FileNotFoundExceptionParserConfigurationExceptionSAXExceptionIOException {
        InputStream expected = this.getClass().getResourceAsStream(expectedOutputResource);
        Assert.assertNotNull("can't open expected output resource"expected);
        InputStream actual = new FileInputStream(outputFile);
        Assert.assertNotNull("can't open actual output resource"actual);
        TestUtils.assertEqualXml(expectedactual);
    }
New to GrepCode? Check out our FAQ X