Sort member

This commit is contained in:
Gary Gregory 2022-10-21 08:55:26 -04:00
parent d19e44c88f
commit db16af9106
1 changed files with 9 additions and 9 deletions

View File

@ -683,6 +683,15 @@ public class CSVFormatTest {
format.toString()); 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 @Test
public void testGetHeader() { public void testGetHeader() {
final String[] header = { "one", "two", "three" }; final String[] header = { "one", "two", "three" };
@ -1169,15 +1178,6 @@ public class CSVFormatTest {
assertFalse(formatWithEmptyDuplicates.getAllowDuplicateHeaderNames()); 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 @Test
public void testWithEmptyEnum() { public void testWithEmptyEnum() {
final CSVFormat formatWithHeader = CSVFormat.DEFAULT.withHeader(EmptyEnum.class); final CSVFormat formatWithHeader = CSVFormat.DEFAULT.withHeader(EmptyEnum.class);