This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push: new b4720f3 Add some missing tests. b4720f3 is described below commit b4720f388fd5a2650babcf2a75600b6439d607b9 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue Jan 11 07:49:15 2022 -0500 Add some missing tests. --- .../commons/io/output/FileWriterWithEncodingTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java b/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java index a0892de..9df2f8e 100644 --- a/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java +++ b/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java @@ -29,6 +29,7 @@ import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; import java.nio.charset.Charset; +import java.nio.charset.CharsetEncoder; import java.nio.file.Files; import org.junit.jupiter.api.BeforeEach; @@ -141,6 +142,20 @@ public class FileWriterWithEncodingTest { } @Test + public void sameEncoding_null_CharsetEncoder_constructor() throws Exception { + try (final FileWriterWithEncoding writer = new FileWriterWithEncoding(file2.getPath(), (CharsetEncoder) null)) { + successfulRun(writer); + } + } + + @Test + public void sameEncoding_null_CharsetName_constructor() throws Exception { + try (final FileWriterWithEncoding writer = new FileWriterWithEncoding(file2.getPath(), (String) null)) { + successfulRun(writer); + } + } + + @Test public void sameEncoding_string_Charset_constructor() throws Exception { try (final FileWriterWithEncoding writer = new FileWriterWithEncoding(file2.getPath(), Charset.defaultCharset())) { successfulRun(writer);