KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > util > io > BlankLineSkippingBufferedReaderTest


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.util.io;
5
6 import com.tc.test.TCTestCase;
7
8 import java.io.StringReader JavaDoc;
9
10 /**
11  * Unit test for {@link BlankLineSkippingBufferedReader}.
12  */

13 public class BlankLineSkippingBufferedReaderTest extends TCTestCase {
14
15   public void test() throws Exception JavaDoc {
16     BlankLineSkippingBufferedReader reader = new BlankLineSkippingBufferedReader(
17                                                                                  new StringReader JavaDoc(
18                                                                                                   "foo\nbar\n\n\nbaz\n\nquux\n"));
19     assertEquals("foo", reader.readLine());
20     assertEquals("bar", reader.readLine());
21     assertEquals("baz", reader.readLine());
22     assertEquals("quux", reader.readLine());
23   }
24
25 }
26
Popular Tags