public class IgnoreTest extends Object
| Constructor and Description |
|---|
IgnoreTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testIgnoreAllWithColumnPositionMappingOnReading()
Ignores fields on reading with all known column position bindings.
|
void |
testIgnoreAllWithHeaderNameMappingOnReading()
Ignores fields on reading with all known header name bindings.
|
void |
testIgnoreOnWriting()
Tests that the mechanisms for ignoring fields also work while writing.
|
void |
testIgnoreWithAnnotationAndColumnPositionMappingOnReading()
Tests ignoring fields using
CsvIgnore and a column position
mapping strategy on reading. |
void |
testIgnoreWithAnnotationAndHeaderNameMappingOnReading()
Tests ignoring fields using
CsvIgnore and a header name mapping
strategy on reading. |
void |
testIgnoreWithMethodAndColumnPositionMappingOnReading()
Ignores a field using
CsvToBeanBuilder.withIgnoreField(Class, Field) and a column
position mapping strategy on reading. |
void |
testIgnoreWithMethodAndHeaderNameMappingOnReading()
Ignores a field using
CsvToBeanBuilder.withIgnoreField(Class, Field) and a header name
mapping strategy on reading. |
void |
testIgnoreWithRecursion() |
void |
testInvalidInputForIgnore() |
void |
testInvalidInputToBuilderForIgnoreOnReading() |
void |
testInvalidInputToBuilderForIgnoreOnWriting() |
void |
testRemappingOnIgnore()
Tests that ignoring fields forces a remapping, which can change
bindings.
|
void |
testSerialVersionUIDNonSerializable()
Tests that the field "serialVersionUID" is written if the bean
does not implement
Serializable. |
void |
testSerialVersionUIDSerializable() |
@Test
public void testSerialVersionUIDNonSerializable()
throws com.opencsv.exceptions.CsvException
Serializable.
Also incidentally tests that beans that opencsv cannot instantiate can still be written. Yeah, I actually broke that once.
com.opencsv.exceptions.CsvException - Never@Test
public void testSerialVersionUIDSerializable()
throws com.opencsv.exceptions.CsvException
com.opencsv.exceptions.CsvException@Test
public void testInvalidInputForIgnore()
throws NoSuchFieldException
NoSuchFieldException@Test public void testInvalidInputToBuilderForIgnoreOnReading()
@Test public void testInvalidInputToBuilderForIgnoreOnWriting()
@Test public void testIgnoreWithAnnotationAndHeaderNameMappingOnReading()
CsvIgnore and a header name mapping
strategy on reading.
Also incidentally tests:
CsvIgnore combined with all forms of
header binding annotations@Test public void testIgnoreWithAnnotationAndColumnPositionMappingOnReading()
CsvIgnore and a column position
mapping strategy on reading.
Also incidentally tests:
CsvIgnore combined with all forms of
position binding annotations@Test
public void testIgnoreWithMethodAndHeaderNameMappingOnReading()
throws NoSuchFieldException
CsvToBeanBuilder.withIgnoreField(Class, Field) and a header name
mapping strategy on reading.
Also incidentally tests:
CsvIgnore and
CsvToBeanBuilder.withIgnoreField(Class, Field)NoSuchFieldException - Never@Test
public void testIgnoreWithMethodAndColumnPositionMappingOnReading()
throws NoSuchFieldException
CsvToBeanBuilder.withIgnoreField(Class, Field) and a column
position mapping strategy on reading.
Also incidentally tests:
NoSuchFieldException - Never@Test
public void testIgnoreAllWithHeaderNameMappingOnReading()
throws NoSuchFieldException
Also incidentally tests:
MappingStrategy.setType(Class) after calling
MappingStrategy.ignoreFields(MultiValuedMap)NoSuchFieldException - Never@Test
public void testIgnoreAllWithColumnPositionMappingOnReading()
throws NoSuchFieldException
Also incidentally tests:
NoSuchFieldException - Never@Test public void testIgnoreWithRecursion()
@Test
public void testRemappingOnIgnore()
throws NoSuchFieldException
Also incidentally tests:
MappingStrategy.setType(Class) before
MappingStrategy.ignoreFields(MultiValuedMap)NoSuchFieldException - Never@Test
public void testIgnoreOnWriting()
throws com.opencsv.exceptions.CsvDataTypeMismatchException,
com.opencsv.exceptions.CsvRequiredFieldEmptyException,
NoSuchFieldException
com.opencsv.exceptions.CsvDataTypeMismatchExceptioncom.opencsv.exceptions.CsvRequiredFieldEmptyExceptionNoSuchFieldExceptionCopyright © 2005–2025. All rights reserved.