Revision a299ffc0
Added by Andreas Müller over 7 years ago
app-import/src/test/java/eu/etaxonomy/cdm/io/iapt/IAPTImportTest.java | ||
---|---|---|
1 | 1 |
package eu.etaxonomy.cdm.io.iapt; |
2 | 2 |
|
3 |
import eu.etaxonomy.cdm.model.occurrence.Collection;
|
|
4 |
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit; |
|
5 |
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
|
|
3 |
import java.util.regex.Matcher;
|
|
4 |
|
|
5 |
import org.junit.Assert;
|
|
6 | 6 |
import org.junit.Before; |
7 | 7 |
import org.junit.Test; |
8 |
import org.junit.Assert; |
|
9 | 8 |
|
10 |
import java.util.regex.Matcher; |
|
9 |
import eu.etaxonomy.cdm.model.occurrence.Collection; |
|
10 |
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit; |
|
11 |
import eu.etaxonomy.cdm.model.occurrence.FieldUnit; |
|
11 | 12 |
|
12 | 13 |
/** |
13 | 14 |
* Created by andreas on 9/15/16. |
14 | 15 |
*/ |
15 | 16 |
public class IAPTImportTest extends Assert { |
16 | 17 |
|
17 |
IAPTExcelImport importer = null; |
|
18 |
IAPTExcelImport<IAPTImportConfigurator> importer = null;
|
|
18 | 19 |
|
19 | 20 |
@Before |
20 | 21 |
public void setup(){ |
21 | 22 |
System.getProperties().put("TEST_MODE", "1"); |
22 |
importer = new IAPTExcelImport(); |
|
23 |
importer = new IAPTExcelImport<>();
|
|
23 | 24 |
} |
24 | 25 |
|
25 | 26 |
@Test |
... | ... | |
70 | 71 |
"B 147519-147520, LE 146520."} |
71 | 72 |
}; |
72 | 73 |
for (String[] t: typeStrings) { |
73 |
Matcher m = importer.typeSpecimenSplitPattern.matcher(t[0]);
|
|
74 |
Matcher m = IAPTExcelImport.typeSpecimenSplitPattern.matcher(t[0]);
|
|
74 | 75 |
assertTrue("typeSpecimenSplitPattern is not matching: " + t[0], m.matches()); |
75 | 76 |
if(!t[1].isEmpty()){ |
76 | 77 |
assertEquals(t[1], m.group("holotype").trim()); |
... | ... | |
131 | 132 |
"leg. J. J. Halda 18.3.1997" |
132 | 133 |
}; |
133 | 134 |
for (String t: typeStrings) { |
134 |
assertTrue("collectorPattern is not matching: " + t, importer.collectorPattern.matcher(t).matches());
|
|
135 |
assertTrue("collectorPattern is not matching: " + t, IAPTExcelImport.collectorPattern.matcher(t).matches());
|
|
135 | 136 |
} |
136 | 137 |
} |
137 | 138 |
} |
Also available in: Unified diff
cleanup IAPTImportTest