@Test public void FileOutputStreamをクローズ中に例外が発生した場合は例外が変換される() throws Exception { thrown.expect(InternalException.class); thrown.expectMessage("ストリームをクローズ中にIO例外が発生しました。"); FileOutputStream m = mock(FileOutputStream.class); doThrow(new IOException()).when(m).close(); CSVWriters writer = CSVs.writers(); writer.fos = m; writer.close(); }
public static CSVWriters writers() { return new CSVWriters(); }
CSVs { public static CSVWriters writers() { return new CSVWriters(); } }
CSVs { public static CSVWriters writers() { return new CSVWriters(); } private  CSVs(); }
CSVs { public static CSVWriters writers() { return new CSVWriters(); } private  CSVs(); static CSVWriters writers(); static CSVWriters writers(CSVConfig config); static CSVReaders readers(File file); static CSVReaders readers(String file); static CSVReaders readers(File file, CSVConfig config); static CSVReaders readers(String file, CSVConfig config); static BeanMappingCSVReaders<T> readers(File file, Class<T> type); static BeanMappingCSVReaders<T> readers(File file, CSVConfig config, Class<T> type); static BeanMappingCSVReaders<T> readers(String file, Class<T> type); static BeanMappingCSVReaders<T> readers(String file, CSVConfig config, Class<T> type); }
CSVs { public static CSVWriters writers() { return new CSVWriters(); } private  CSVs(); static CSVWriters writers(); static CSVWriters writers(CSVConfig config); static CSVReaders readers(File file); static CSVReaders readers(String file); static CSVReaders readers(File file, CSVConfig config); static CSVReaders readers(String file, CSVConfig config); static BeanMappingCSVReaders<T> readers(File file, Class<T> type); static BeanMappingCSVReaders<T> readers(File file, CSVConfig config, Class<T> type); static BeanMappingCSVReaders<T> readers(String file, Class<T> type); static BeanMappingCSVReaders<T> readers(String file, CSVConfig config, Class<T> type);  }