01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.util.io;
05:
06: import com.tc.test.TCTestCase;
07:
08: import java.io.StringReader;
09:
10: /**
11: * Unit test for {@link BlankLineSkippingBufferedReader}.
12: */
13: public class BlankLineSkippingBufferedReaderTest extends TCTestCase {
14:
15: public void test() throws Exception {
16: BlankLineSkippingBufferedReader reader = new BlankLineSkippingBufferedReader(
17: new StringReader("foo\nbar\n\n\nbaz\n\nquux\n"));
18: assertEquals("foo", reader.readLine());
19: assertEquals("bar", reader.readLine());
20: assertEquals("baz", reader.readLine());
21: assertEquals("quux", reader.readLine());
22: }
23:
24: }
|