@@ -0,0 +1,2674 @@
+package sample.io;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.CoreMatchers.nullValue;%0Aimport static org.junit.Assert.assertThat;%0A%0Aimport java.io.Reader;%0Aimport java.io.StringReader;%0A%0Aimport org.junit.After;%0Aimport org.junit.Test;%0A%0Apublic class BufferedReaderWrapperTest %7B%0A%0A    BufferedReaderWrapper sut;%0A%0A    @After%0A    public void teardown() throws Exception%7B%0A        sut.close();%0A    %7D%0A%0A    @Test%0A    public void test_empty() throws Exception %7B%0A        String str = %22%22;%0A%0A        Reader r = new StringReader(str);%0A        sut = new BufferedReaderWrapper(r, '%5Cn');%0A%0A        String line = sut.readLineWithNewline();%0A        assertThat(line, is(nullValue()));%0A    %7D%0A%0A    @Test%0A    public void test_lf() throws Exception %7B%0A        String str = %22aa%5Cn%22%0A                + %22%5Cn%22%0A                + %22%E3%81%82%E3%81%82%5Cn%22;%0A%0A        Reader r = new StringReader(str);%0A        sut = new BufferedReaderWrapper(r, '%5Cn');%0A%0A        %7B%0A            String line = sut.readLineWithNewline();%0A            assertThat(line, is(%22aa%5Cn%22));%0A        %7D%0A        %7B%0A            String line = sut.readLineWithNewline();%0A            assertThat(line, is(%22%5Cn%22));%0A        %7D%0A        %7B%0A            String line = sut.readLineWithNewline();%0A            assertThat(line, is(%22%E3%81%82%E3%81%82%5Cn%22));%0A        %7D%0A        %7B%0A            String line = sut.readLineWithNewline();%0A            assertThat(line, is(nullValue()));%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void test_lf_no_last_newline() throws Exception %7B%0A        String str = %22aa%5Cn%22%0A                + %22%E3%81%82%E3%81%82%22;%0A%0A        Reader r = new StringReader(str);%0A        sut = new BufferedReaderWrapper(r, '%5Cn');%0A%0A        %7B%0A            String line = sut.readLineWithNewline();%0A            assertThat(line, is(%22aa%5Cn%22));%0A        %7D%0A        %7B%0A            String line = sut.readLineWithNewline();%0A            assertThat(line, is(%22%E3%81%82%E3%81%82%22));%0A        %7D%0A        %7B%0A            String line = sut.readLineWithNewline();%0A            assertThat(line, is(nullValue()));%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void test_crlf() throws Exception %7B%0A        String str = %22aa%5Cr%5Cn%22%0A                + %22%5Cr%5Cn%22%0A                + %22%E3%81%82%E3%81%82%5Cr%5Cn%22;%0A%0A        Reader r = new StringReader(str);%0A        sut = new BufferedReaderWrapper(r, '%5Cn');%0A%0A        %7B%0A            String line = sut.readLineWithNewline();%0A            assertThat(line, is(%22aa%5Cr%5Cn%22));%0A        %7D%0A        %7B%0A            String line = sut.readLineWithNewline();%0A            assertThat(line, is(%22%5Cr%5Cn%22));%0A        %7D%0A        %7B%0A            String line = sut.readLineWithNewline();%0A            assertThat(line, is(%22%E3%81%82%E3%81%82%5Cr%5Cn%22));%0A        %7D%0A        %7B%0A            String line = sut.readLineWithNewline();%0A            assertThat(line, is(nullValue()));%0A        %7D%0A    %7D%0A%0A%7D%0A

Add BufferedReaderWrapperTest