ReadLine() public method

Reads a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed.
If an I/O error occurs
public ReadLine ( ) : string
return string
Beispiel #1
0
        private void assertLines(string @in, params string[] lines)
        {
            BufferedCharFilter bufferedReader
                = new BufferedCharFilter(new StringReader(@in));

            foreach (String line in lines)
            {
                assertEquals(line, bufferedReader.ReadLine());
            }
            assertNull(bufferedReader.ReadLine());
        }
 public void Test_ReadLine()
 {
     // Test for method java.lang.String java.io.BufferedReader.readLine()
     try
     {
         br = new BufferedCharFilter(new StringReader(testString));
         String r = br.ReadLine();
         assertEquals("readLine returned incorrect string", "Test_All_Tests", r
                      );
     }
     catch (Exception e) when(e.IsIOException())
     {
         fail("Exception during readLine test");
     }
 }
Beispiel #3
0
        public void Test_ReadLine()
        {
            // Test for method java.lang.String java.io.BufferedReader.readLine()
            try
            {
                br = new BufferedCharFilter(new StringReader(testString));
                String r = br.ReadLine();
                assertEquals("readLine returned incorrect string", "Test_All_Tests", r
                             );
            }
#pragma warning disable 168
            catch (IOException e)
#pragma warning restore 168
            {
                fail("Exception during readLine test");
            }
        }