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-csv.git
commit db16af91069d1ecde3f16d2d96ba4d5da7a07ac2 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Oct 21 08:55:26 2022 -0400 Sort member --- .../java/org/apache/commons/csv/CSVFormatTest.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/java/org/apache/commons/csv/CSVFormatTest.java b/src/test/java/org/apache/commons/csv/CSVFormatTest.java index eb13494c..53591bd9 100644 --- a/src/test/java/org/apache/commons/csv/CSVFormatTest.java +++ b/src/test/java/org/apache/commons/csv/CSVFormatTest.java @@ -683,6 +683,15 @@ public class CSVFormatTest { format.toString()); } + @Test + public void testGetAllowDuplicateHeaderNames() { + final Builder builder = CSVFormat.DEFAULT.builder(); + assertTrue(builder.build().getAllowDuplicateHeaderNames()); + assertTrue(builder.setDuplicateHeaderMode(DuplicateHeaderMode.ALLOW_ALL).build().getAllowDuplicateHeaderNames()); + assertFalse(builder.setDuplicateHeaderMode(DuplicateHeaderMode.ALLOW_EMPTY).build().getAllowDuplicateHeaderNames()); + assertFalse(builder.setDuplicateHeaderMode(DuplicateHeaderMode.DISALLOW).build().getAllowDuplicateHeaderNames()); + } + @Test public void testGetHeader() { final String[] header = { "one", "two", "three" }; @@ -1169,15 +1178,6 @@ public class CSVFormatTest { assertFalse(formatWithEmptyDuplicates.getAllowDuplicateHeaderNames()); } - @Test - public void testGetAllowDuplicateHeaderNames() { - final Builder builder = CSVFormat.DEFAULT.builder(); - assertTrue(builder.build().getAllowDuplicateHeaderNames()); - assertTrue(builder.setDuplicateHeaderMode(DuplicateHeaderMode.ALLOW_ALL).build().getAllowDuplicateHeaderNames()); - assertFalse(builder.setDuplicateHeaderMode(DuplicateHeaderMode.ALLOW_EMPTY).build().getAllowDuplicateHeaderNames()); - assertFalse(builder.setDuplicateHeaderMode(DuplicateHeaderMode.DISALLOW).build().getAllowDuplicateHeaderNames()); - } - @Test public void testWithEmptyEnum() { final CSVFormat formatWithHeader = CSVFormat.DEFAULT.withHeader(EmptyEnum.class);