Revision d2a09415
Added by Andreas Kohlbecker over 8 years ago
modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Scorzonera_SynonymyTest.java | ||
---|---|---|
1 |
// $Id$ |
|
2 |
/** |
|
3 |
* Copyright (C) 2009 EDIT |
|
4 |
* European Distributed Institute of Taxonomy |
|
5 |
* http://www.e-taxonomy.eu |
|
6 |
* |
|
7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
9 |
*/ |
|
10 |
package eu.etaxonomy.dataportal.selenium.tests.cichorieae; |
|
11 |
|
|
12 |
import static org.junit.Assert.assertEquals; |
|
13 |
|
|
14 |
import java.net.MalformedURLException; |
|
15 |
import java.util.List; |
|
16 |
import java.util.UUID; |
|
17 |
|
|
18 |
import org.junit.Test; |
|
19 |
|
|
20 |
import eu.etaxonomy.dataportal.DataPortalContext; |
|
21 |
import eu.etaxonomy.dataportal.elements.TypeDesignationElement; |
|
22 |
import eu.etaxonomy.dataportal.elements.TypeDesignationType; |
|
23 |
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase; |
|
24 |
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts; |
|
25 |
import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage; |
|
26 |
|
|
27 |
/** |
|
28 |
* |
|
29 |
* @author a.kohlbecker |
|
30 |
* |
|
31 |
*/ |
|
32 |
|
|
33 |
@DataPortalContexts( { DataPortalContext.cichorieae }) |
|
34 |
public class Scorzonera_SynonymyTest extends CdmDataPortalTestBase{ |
|
35 |
|
|
36 |
static UUID scorzonera_Uuid = UUID.fromString("c1e8a3f2-2b65-4aad-ad25-1cf9df92e290"); |
|
37 |
|
|
38 |
@Test |
|
39 |
public void scorzonera_typeDesignations() throws MalformedURLException { |
|
40 |
TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), scorzonera_Uuid); |
|
41 |
assertEquals(getContext().prepareTitle("Scorzonera"), p.getTitle()); |
|
42 |
assertEquals("Scorzonera L., Sp. Pl.: 790. 1753", p.getAcceptedNameText()); |
|
43 |
|
|
44 |
|
|
45 |
// check type designation for accepted taxon |
|
46 |
List<TypeDesignationElement> typeDesignations = p.getHomotypicalGroupTypeDesignations(); |
|
47 |
assertEquals("Expecting one Typedesignation", 1, typeDesignations.size()); |
|
48 |
assertEquals(TypeDesignationType.nameTypeDesignation, typeDesignations.get(0).getTypeDesignationType()); |
|
49 |
assertEquals("Lectotype (designated by Green 1929: 1771): Scorzonera humilis L.", typeDesignations.get(0).getText()); // last digit of 1771 is footnote key !!! |
|
50 |
assertEquals("should have one footnote from type designation", 1, p.getAcceptedNameFootNotes().size()); |
|
51 |
assertEquals("", "1. Green, Proposals by British Botanists. 1929", p.getAcceptedNameFootNotes().get(0).getText()); |
|
52 |
// assertNull("The typified name should not have a name description (protologue)", typeDesignations.get(0).getNameDescription()); // FIXME |
|
53 |
|
|
54 |
assertEquals("= Gelasia Cass. in Bull. Sci. Soc. Philom. Paris 1818: 33. 1818", p.getHeterotypicalGroupSynonymName(1, 1)); |
|
55 |
List<TypeDesignationElement> heterotypicalGroupTypeDesignations = p.getHeterotypicalGroupTypeDesignations(1); |
|
56 |
assertEquals("Type: Gelasia villosa (Scop.) Cass.", heterotypicalGroupTypeDesignations.get(0).getText()); |
|
57 |
assertEquals(TypeDesignationType.nameTypeDesignation, heterotypicalGroupTypeDesignations.get(0).getTypeDesignationType()); |
|
58 |
|
|
59 |
// test case only available in production portal |
|
60 |
// assertEquals("≡ Scorzonera subg. Lasiospora (Cass.) Peterm., Deutschl. Fl.: 334. 1846-1849", p.getHeterotypicalGroupSynonymName(2, 3)); |
|
61 |
// heterotypicalGroupTypeDesignations = p.getHeterotypicalGroupTypeDesignations(2); |
|
62 |
// assertEquals("Lectotype (designated by Tzvelev 1989: 452): Lasiospora hirsuta (Gouan) Cass.", heterotypicalGroupTypeDesignations.get(0).getText()); |
|
63 |
// assertEquals(TypeDesignationType.nameTypeDesignation, heterotypicalGroupTypeDesignations.get(0).getTypeDesignationType()); |
|
64 |
// assertEquals("Should have one foot note", 1, p.getHeterotypicalGroupFootNotes(2).size()); // FIXME |
|
65 |
|
|
66 |
|
|
67 |
// also to some synonymy checks |
|
68 |
assertEquals("– Scorzonera sect. Euscorzonera DC., Prodr. 7: 117. 1838, nom. inval.", p.getHeterotypicalGroupSynonymName(58, 1)); |
|
69 |
assertEquals("– Scorzonera subsect. Euvierhapperia Lipsch., Fragm. Monogr. Scorzonera 2: 89. 1939, nom. inval.", p.getHeterotypicalGroupSynonymName(59, 1)); |
|
70 |
} |
|
71 |
} |
|
1 |
// $Id$ |
|
2 |
/** |
|
3 |
* Copyright (C) 2009 EDIT |
|
4 |
* European Distributed Institute of Taxonomy |
|
5 |
* http://www.e-taxonomy.eu |
|
6 |
* |
|
7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
9 |
*/ |
|
10 |
package eu.etaxonomy.dataportal.selenium.tests.cichorieae; |
|
11 |
|
|
12 |
import static org.junit.Assert.assertEquals; |
|
13 |
|
|
14 |
import java.net.MalformedURLException; |
|
15 |
import java.util.List; |
|
16 |
import java.util.UUID; |
|
17 |
|
|
18 |
import org.junit.Test; |
|
19 |
|
|
20 |
import eu.etaxonomy.dataportal.DataPortalContext; |
|
21 |
import eu.etaxonomy.dataportal.elements.TypeDesignationElement; |
|
22 |
import eu.etaxonomy.dataportal.elements.TypeDesignationType; |
|
23 |
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase; |
|
24 |
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts; |
|
25 |
import eu.etaxonomy.dataportal.pages.TaxonSynonymyPage; |
|
26 |
|
|
27 |
/** |
|
28 |
* |
|
29 |
* @author a.kohlbecker |
|
30 |
* |
|
31 |
*/ |
|
32 |
|
|
33 |
@DataPortalContexts( { DataPortalContext.cichorieae }) |
|
34 |
public class Scorzonera_SynonymyTest extends CdmDataPortalTestBase{ |
|
35 |
|
|
36 |
static UUID scorzonera_Uuid = UUID.fromString("c1e8a3f2-2b65-4aad-ad25-1cf9df92e290"); |
|
37 |
|
|
38 |
@Test |
|
39 |
public void scorzonera_typeDesignations() throws MalformedURLException { |
|
40 |
TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), scorzonera_Uuid); |
|
41 |
assertEquals(getContext().prepareTitle("Scorzonera"), p.getTitle()); |
|
42 |
assertEquals("Scorzonera L., Sp. Pl.: 790. 1753", p.getAcceptedNameText()); |
|
43 |
|
|
44 |
|
|
45 |
// check type designation for accepted taxon |
|
46 |
List<TypeDesignationElement> typeDesignations = p.getHomotypicalGroupTypeDesignations(); |
|
47 |
assertEquals("Expecting one Typedesignation", 1, typeDesignations.size()); |
|
48 |
assertEquals(TypeDesignationType.nameTypeDesignation, typeDesignations.get(0).getTypeDesignationType()); |
|
49 |
assertEquals("Lectotype (designated by Green 1929: 1771): Scorzonera humilis L.", typeDesignations.get(0).getText()); // last digit of 1771 is footnote key !!! |
|
50 |
assertEquals("should have one footnote from type designation", 1, p.getAcceptedNameFootNotes().size()); |
|
51 |
assertEquals("", "1. Green, Proposals by British Botanists. 1929", p.getAcceptedNameFootNotes().get(0).getText()); |
|
52 |
// assertNull("The typified name should not have a name description (protologue)", typeDesignations.get(0).getNameDescription()); // FIXME |
|
53 |
|
|
54 |
assertEquals("= Gelasia Cass. in Bull. Sci. Soc. Philom. Paris 1818: 33. 1818", p.getHeterotypicalGroupSynonymName(1, 1)); |
|
55 |
List<TypeDesignationElement> heterotypicalGroupTypeDesignations = p.getHeterotypicalGroupTypeDesignations(1); |
|
56 |
assertEquals("Type: Gelasia villosa (Scop.) Cass.", heterotypicalGroupTypeDesignations.get(0).getText()); |
|
57 |
assertEquals(TypeDesignationType.nameTypeDesignation, heterotypicalGroupTypeDesignations.get(0).getTypeDesignationType()); |
|
58 |
|
|
59 |
// test case only available in production portal |
|
60 |
// assertEquals("≡ Scorzonera subg. Lasiospora (Cass.) Peterm., Deutschl. Fl.: 334. 1846-1849", p.getHeterotypicalGroupSynonymName(2, 3)); |
|
61 |
// heterotypicalGroupTypeDesignations = p.getHeterotypicalGroupTypeDesignations(2); |
|
62 |
// assertEquals("Lectotype (designated by Tzvelev 1989: 452): Lasiospora hirsuta (Gouan) Cass.", heterotypicalGroupTypeDesignations.get(0).getText()); |
|
63 |
// assertEquals(TypeDesignationType.nameTypeDesignation, heterotypicalGroupTypeDesignations.get(0).getTypeDesignationType()); |
|
64 |
// assertEquals("Should have one foot note", 1, p.getHeterotypicalGroupFootNotes(2).size()); // FIXME |
|
65 |
|
|
66 |
|
|
67 |
// also to some synonymy checks |
|
68 |
assertEquals("– Scorzonera sect. Euscorzonera DC., Prodr. 7: 117. 1838, nom. inval.", p.getHeterotypicalGroupSynonymName(58, 1)); |
|
69 |
assertEquals("– Scorzonera subsect. Euvierhapperia Lipsch., Fragm. Monogr. Scorzonera 2: 89. 1939, nom. inval.", p.getHeterotypicalGroupSynonymName(59, 1)); |
|
70 |
} |
|
71 |
} |
Also available in: Unified diff
CRLF will be replaced by LF issues