Пример #1
0
 public void test_setRecordLength_ZeroRecordLength() {
   try {
     reader.setRecordLength(0);
     fail();
   } catch (IllegalArgumentException err) {
     assertEquals("Record length MUST be greater than zero", err.getMessage());
   }
 }
Пример #2
0
  protected void setUp() throws Exception {
    super.setUp();

    fileUtil = mock(FileUtil.class);

    reader = new ShuntNioRecordReader(FILE);
    reader.setRecordLength(5);
    reader.setFileUtil((FileUtil) fileUtil.proxy());
  }