Add testGetDuplicateHeaderMode()
This commit is contained in:
parent
db16af9106
commit
b4799e799a
|
@ -692,6 +692,16 @@ public class CSVFormatTest {
|
|||
assertFalse(builder.setDuplicateHeaderMode(DuplicateHeaderMode.DISALLOW).build().getAllowDuplicateHeaderNames());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetDuplicateHeaderMode() {
|
||||
final Builder builder = CSVFormat.DEFAULT.builder();
|
||||
|
||||
assertEquals(DuplicateHeaderMode.ALLOW_ALL, builder.build().getDuplicateHeaderMode());
|
||||
assertEquals(DuplicateHeaderMode.ALLOW_ALL, builder.setDuplicateHeaderMode(DuplicateHeaderMode.ALLOW_ALL).build().getDuplicateHeaderMode());
|
||||
assertEquals(DuplicateHeaderMode.ALLOW_EMPTY, builder.setDuplicateHeaderMode(DuplicateHeaderMode.ALLOW_EMPTY).build().getDuplicateHeaderMode());
|
||||
assertEquals(DuplicateHeaderMode.DISALLOW, builder.setDuplicateHeaderMode(DuplicateHeaderMode.DISALLOW).build().getDuplicateHeaderMode());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetHeader() {
|
||||
final String[] header = { "one", "two", "three" };
|
||||
|
|
Loading…
Reference in New Issue