Start line:  
End line:  

Snippet Preview

Snippet HTML Code

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

Author(s):
akislev
public abstract class AbstractExternalDataTest {
    protected ExternalDataWithTextCorpusStreamed read(String resource,
            EnumSet<ExternalDataLayerTagedLayersToRead,
            EnumSet<TextCorpusLayerTagtcLayersToReadthrows Exception {
        InputStream is = this.getClass().getResourceAsStream(resource);
        ExternalDataWithTextCorpusStreamed edtc = new ExternalDataWithTextCorpusStreamed(isedLayersToReadtcLayersToRead);
        edtc.close();
        ..println(edtc);
        return edtc;
    }
    protected ExternalDataWithTextCorpusStreamed open(String inputResourceString outputFileEnumSet<ExternalDataLayerTagedLayersToReadEnumSet<TextCorpusLayerTagtcLayersToReadthrows 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 ExternalDataWithTextCorpusStreamed(isedLayersToReadtcLayersToReados);
    }
    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