Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 
 package eu.clarin.weblicht.wlfxb.io;
 
 import static org.junit.Assert.assertEquals;
 import org.junit.Test;

Author(s):
Yana Panchenko
public class WLDProfileReadTest {
    private static final String INPUT_FILE_Textcorpus04 = "/data/profiler/input_tcf04.xml";
    private static final String INPUT_FILE_Textcorpus03 = "/data/profiler/input_tcf03.xml";
    private static final String INPUT_FILE_Lexicon04 = "/data/profiler/input_lex04.xml";
    public WLDProfileReadTest() {
    }
    @Test
    public void testRead_File1() throws Exception {
        WLDProfile profile = test();
        assertEquals("0.4"profile.getVersion());
        assertEquals("de"profile.getTcProfile().getLang());
        assertEquals(nullprofile.getLexProfile());
    }
    @Test
    public void testRead_File2() throws Exception {
        WLDProfile profile = test();
        assertEquals("0.3"profile.getVersion());
        assertEquals("en"profile.getTcProfile().getLang());
        assertEquals(nullprofile.getLexProfile());
    }
    @Test
    public void testRead_File3() throws Exception {
        WLDProfile profile = test();
        assertEquals("0.4"profile.getVersion());
        assertEquals("de"profile.getLexProfile().getLang());
        assertEquals(nullprofile.getTcProfile());
    }
    private WLDProfile test(String filethrows Exception {
        ..println();
        ..println("--- READ TEST START ---");
        InputStream is = this.getClass().getResourceAsStream(file);
        WLDProfile wldProfile = WLDProfiler.read(is);
        ..println(wldProfile);
        ..println("--- READ TEST END ---");
        ..println();
        return wldProfile;
    }
New to GrepCode? Check out our FAQ X