Start line:  
End line:  

Snippet Preview

Snippet HTML Code

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

Author(s):
akislev
public abstract class AbstractLexiconTest {
    protected Lexicon read(String resourceEnumSet<LexiconLayerTaglayersToReadthrows Exception {
        InputStream is = this.getClass().getResourceAsStream(resource);
        LexiconStreamed lex = new LexiconStreamed(islayersToRead);
        lex.close();
        ..println(lex);
        return lex;
    }
    protected LexiconStreamed open(String inputResourceString outputFileEnumSet<LexiconLayerTaglayersToReadthrows 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 LexiconStreamed(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