@Test public void testGetTaxonRank() { @SuppressWarnings("unchecked") CSVRecordInfo<BrahmsCsvField> record = mock(CSVRecordInfo.class); when(record.get(SPECIES)).thenReturn("Rhododendron ferrugineum L."); when(record.get(AUTHOR2)).thenReturn("L."); when(record.get(GENUS)).thenReturn("Rhododendron"); when(record.get(SP1)).thenReturn("ferrugineum"); when(record.get(RANK2)).thenReturn("testInfraSpecifc"); when(record.get(RANK1)).thenReturn("testTaxonRank"); when(record.get(SP2)).thenReturn("testInfraEpithat"); String actual = BrahmsImportUtil.getTaxonRank(record); assertEquals("testTaxonRank", actual); }
public static String getTaxonRank(CSVRecordInfo<BrahmsCsvField> record) { if (record.get(SP3) == null) { if (record.get(SP2) == null) { if (record.get(SP1) == null) { return "genus"; } return "species"; } return record.get(RANK1); } return record.get(RANK2); }
BrahmsImportUtil { public static String getTaxonRank(CSVRecordInfo<BrahmsCsvField> record) { if (record.get(SP3) == null) { if (record.get(SP2) == null) { if (record.get(SP1) == null) { return "genus"; } return "species"; } return record.get(RANK1); } return record.get(RANK2); } }
BrahmsImportUtil { public static String getTaxonRank(CSVRecordInfo<BrahmsCsvField> record) { if (record.get(SP3) == null) { if (record.get(SP2) == null) { if (record.get(SP1) == null) { return "genus"; } return "species"; } return record.get(RANK1); } return record.get(RANK2); } BrahmsImportUtil(); }
BrahmsImportUtil { public static String getTaxonRank(CSVRecordInfo<BrahmsCsvField> record) { if (record.get(SP3) == null) { if (record.get(SP2) == null) { if (record.get(SP1) == null) { return "genus"; } return "species"; } return record.get(RANK1); } return record.get(RANK2); } BrahmsImportUtil(); static File[] getCsvFiles(); static void backup(); static void removeBackupExtension(); static ScientificName getScientificName(CSVRecordInfo<BrahmsCsvField> record); static DefaultClassification getDefaultClassification(CSVRecordInfo<BrahmsCsvField> record,
			ScientificName sn); static List<Monomial> getSystemClassification(DefaultClassification dc); static String getAuthor(CSVRecordInfo<BrahmsCsvField> record); static String getInfraspecificMarker(CSVRecordInfo<BrahmsCsvField> record); static String getInfraspecificEpithet(CSVRecordInfo<BrahmsCsvField> record); static String getTaxonRank(CSVRecordInfo<BrahmsCsvField> record); static File getDataDir(); }
BrahmsImportUtil { public static String getTaxonRank(CSVRecordInfo<BrahmsCsvField> record) { if (record.get(SP3) == null) { if (record.get(SP2) == null) { if (record.get(SP1) == null) { return "genus"; } return "species"; } return record.get(RANK1); } return record.get(RANK2); } BrahmsImportUtil(); static File[] getCsvFiles(); static void backup(); static void removeBackupExtension(); static ScientificName getScientificName(CSVRecordInfo<BrahmsCsvField> record); static DefaultClassification getDefaultClassification(CSVRecordInfo<BrahmsCsvField> record,
			ScientificName sn); static List<Monomial> getSystemClassification(DefaultClassification dc); static String getAuthor(CSVRecordInfo<BrahmsCsvField> record); static String getInfraspecificMarker(CSVRecordInfo<BrahmsCsvField> record); static String getInfraspecificEpithet(CSVRecordInfo<BrahmsCsvField> record); static String getTaxonRank(CSVRecordInfo<BrahmsCsvField> record); static File getDataDir();  }