@Test public void writeText_A$String_StringIsEmpty() throws Exception { File file = new File("src/test/resources/tmp.txt"); FileWriterCommonsIOImpl target = new FileWriterCommonsIOImpl(file); String text = ""; target.writeText(text); file.setWritable(true); }
@Override public void writeText(String text) throws IOException { if (encoding != null) { FileUtils.writeStringToFile(file, text, encoding); } else { FileUtils.writeStringToFile(file, text); } }
FileWriterCommonsIOImpl implements FileWriter { @Override public void writeText(String text) throws IOException { if (encoding != null) { FileUtils.writeStringToFile(file, text, encoding); } else { FileUtils.writeStringToFile(file, text); } } }
FileWriterCommonsIOImpl implements FileWriter { @Override public void writeText(String text) throws IOException { if (encoding != null) { FileUtils.writeStringToFile(file, text, encoding); } else { FileUtils.writeStringToFile(file, text); } } FileWriterCommonsIOImpl(File file); }
FileWriterCommonsIOImpl implements FileWriter { @Override public void writeText(String text) throws IOException { if (encoding != null) { FileUtils.writeStringToFile(file, text, encoding); } else { FileUtils.writeStringToFile(file, text); } } FileWriterCommonsIOImpl(File file); @Override FileWriter setEncoding(String encoding); @Override FileWriter setWriteTarget(File file); @Override void writeText(String text); @Override void writeText(String text, String encoding); }
FileWriterCommonsIOImpl implements FileWriter { @Override public void writeText(String text) throws IOException { if (encoding != null) { FileUtils.writeStringToFile(file, text, encoding); } else { FileUtils.writeStringToFile(file, text); } } FileWriterCommonsIOImpl(File file); @Override FileWriter setEncoding(String encoding); @Override FileWriter setWriteTarget(File file); @Override void writeText(String text); @Override void writeText(String text, String encoding);  }