Extract local variable
Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/1ccc7b3d Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/1ccc7b3d Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/1ccc7b3d Branch: refs/heads/master Commit: 1ccc7b3d1348cf3b981f0a8a4ee885a0a6e8c3f2 Parents: 734b777 Author: Benedikt Ritter <brit...@apache.org> Authored: Sun Apr 19 11:44:39 2015 +0200 Committer: Benedikt Ritter <brit...@apache.org> Committed: Sun Apr 19 11:44:39 2015 +0200 ---------------------------------------------------------------------- .../commons/text/names/HumanNameParserTest.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-text/blob/1ccc7b3d/src/test/java/org/apache/commons/text/names/HumanNameParserTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/text/names/HumanNameParserTest.java b/src/test/java/org/apache/commons/text/names/HumanNameParserTest.java index 86cd304..90e1dfa 100644 --- a/src/test/java/org/apache/commons/text/names/HumanNameParserTest.java +++ b/src/test/java/org/apache/commons/text/names/HumanNameParserTest.java @@ -61,27 +61,28 @@ public class HumanNameParserTest { /** * Validates a line in the testNames.txt file. * - * @param record the tokens with leading spaces + * @param record a CSVRecord representing one record in the input file. */ private void validateRecord(CSVRecord record) { HumanNameParser parser = new HumanNameParser(record.get(Colums.Name)); - assertThat("Wrong LeadingInit in record " + record.getRecordNumber(), + long recordNum = record.getRecordNumber(); + assertThat("Wrong LeadingInit in record " + recordNum, parser.getLeadingInit(), equalTo(record.get(Colums.LeadingInit))); - assertThat("Wrong FirstName in record " + record.getRecordNumber(), + assertThat("Wrong FirstName in record " + recordNum, parser.getFirst(), equalTo(record.get(Colums.FirstName))); - assertThat("Wrong NickName in record " + record.getRecordNumber(), + assertThat("Wrong NickName in record " + recordNum, parser.getNickname(), equalTo(record.get(Colums.NickName))); - assertThat("Wrong MiddleName in record " + record.getRecordNumber(), + assertThat("Wrong MiddleName in record " + recordNum, parser.getMiddle(), equalTo(record.get(Colums.MiddleName))); - assertThat("Wrong LastName in record " + record.getRecordNumber(), + assertThat("Wrong LastName in record " + recordNum, parser.getLast(), equalTo(record.get(Colums.LastName))); - assertThat("Wrong Suffix in record " + record.getRecordNumber(), + assertThat("Wrong Suffix in record " + recordNum, parser.getSuffix(), equalTo(record.get(Colums.Suffix))); }