Make sure an unmapped header returns null

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1498003 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2013-06-29 19:04:01 +00:00
parent 1579c1786a
commit 20721c5a3d
1 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,7 @@ package org.apache.commons.csv;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.util.HashMap;
@ -69,6 +70,11 @@ public class CSVRecordTest {
recordWithHeader.get("fourth");
}
@Test
public void testGetUnmapped() {
assertNull(recordWithHeader.get("fourth"));
}
@Test
public void testIsConsistent() {
assertTrue(record.isConsistent());