@Test public void testReadWindowRead1Line0() { int size = 2; TextReader textReader = new TextReader(this.contents, size); Window w = textReader.getNextWindow(); assertThat( textReader.getContents().get(w.getStartingLine()), is("1" + TextReader.EOL)); // "" "" 1 }
@Test public void testReadWindowRead2Line1() { int size = 2; TextReader textReader = new TextReader(this.contents, size); Window w; w = textReader.getNextWindow(); w = textReader.getNextWindow(); assertThat( textReader.getContents().get(w.getStartingLine() + 1), is("\u0020\u0020" + TextReader.EOL)); }
@Test public void testReadWindowRead4Line0() { int size = 2; TextReader textReader = new TextReader(this.contents, size); Window w; w = textReader.getNextWindow(); // "" 1 w = textReader.getNextWindow(); // 1 2 w = textReader.getNextWindow(); // 2 "" w = textReader.getNextWindow(); // "" "" assertThat(w, is(nullValue())); }