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/Cichorieae_TypeTest.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 |
* tests to avoid regression of #2306 (holotype is only displayed as type) and related bugs |
|
29 |
* |
|
30 |
* @author a.kohlbecker |
|
31 |
* |
|
32 |
*/ |
|
33 |
|
|
34 |
@DataPortalContexts( { DataPortalContext.cichorieae }) |
|
35 |
public class Cichorieae_TypeTest extends CdmDataPortalTestBase{ |
|
36 |
|
|
37 |
|
|
38 |
static UUID cichorium_uuid = UUID.fromString("21d7161a-455e-4f4d-9d61-7f0100c38ff3"); |
|
39 |
|
|
40 |
static UUID scorzonera_tuzgoluensis_Uuid = UUID.fromString("296b4758-048a-47bb-a394-affca64dfc40"); |
|
41 |
|
|
42 |
static UUID lactuca_glandulifera_Uuid = UUID.fromString("6ece0be7-ba4a-4363-b103-4e60429988e5"); |
|
43 |
|
|
44 |
|
|
45 |
@Test |
|
46 |
public void cichorium() throws MalformedURLException { |
|
47 |
TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), cichorium_uuid); |
|
48 |
assertEquals(getContext().prepareTitle("Cichorium"), driver.getTitle()); |
|
49 |
assertEquals("Cichorium L., Sp. Pl.: 813. 1753", p.getAcceptedNameText()); |
|
50 |
List<TypeDesignationElement> typeDesignations = p.getHomotypicalGroupTypeDesignations(); |
|
51 |
assertEquals("Expecting one Typedesignation", 1, typeDesignations.size()); |
|
52 |
assertEquals(TypeDesignationType.nameTypeDesignation, typeDesignations.get(0).getTypeDesignationType()); |
|
53 |
assertEquals("Lectotype (designated by Green 1929: 1781): Cichorium intybus L.", typeDesignations.get(0).getText()); |
|
54 |
} |
|
55 |
|
|
56 |
@Test |
|
57 |
public void scorzonera_tuzgoluensis() throws MalformedURLException { |
|
58 |
TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), scorzonera_tuzgoluensis_Uuid); |
|
59 |
assertEquals(getContext().prepareTitle("Scorzonera tuzgoluensis"), driver.getTitle()); |
|
60 |
List<TypeDesignationElement> typeDesignations = p.getHomotypicalGroupTypeDesignations(); |
|
61 |
assertEquals("Expecting one Typedesignation", 1, typeDesignations.size()); |
|
62 |
assertEquals(TypeDesignationType.specimenTypeDesignation, typeDesignations.get(0).getTypeDesignationType()); |
|
63 |
assertEquals("Holotype: Turkey, B4 Konya, Cihanbeyli, between Gölyazı-Tuzgölü, alt. 908 m, 38°32'33.12\"N, 33°21'11.28\"E, A. Duran, B. Doğan & S. Makbul (KNYA).", typeDesignations.get(0).getText()); |
|
64 |
} |
|
65 |
|
|
66 |
@Test |
|
67 |
public void lactuca_glandulifera() throws MalformedURLException { |
|
68 |
TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), lactuca_glandulifera_Uuid); |
|
69 |
assertEquals(getContext().prepareTitle("Lactuca glandulifera"), driver.getTitle()); |
|
70 |
List<TypeDesignationElement> typeDesignations = p.getHeterotypicalGroupTypeDesignations(1); |
|
71 |
assertEquals("Expecting 7 Typedesignation", 7, typeDesignations.size()); |
|
72 |
|
|
73 |
assertEquals(TypeDesignationType.specimenTypeDesignation, typeDesignations.get(0).getTypeDesignationType()); |
|
74 |
assertEquals("Syntype: [Cameroon] \"Bamenda\", Ledermann 1889", typeDesignations.get(0).getText()); |
|
75 |
assertEquals("Syntype: [Tanzania] \"Kilimandscharo\", Volkens 1238", typeDesignations.get(1).getText()); |
|
76 |
assertEquals("Syntype: [Malawi] \"Kyimbila\", Stolz 306", typeDesignations.get(2).getText()); |
|
77 |
assertEquals("Syntype: [Kenya] \"Mt. Aberdare: Ostseite\", 12 Mar 1922, R. E. Fries 2172", typeDesignations.get(3).getText()); |
|
78 |
assertEquals("Syntype: [Kenya] \"Mt. Kenia: Nordostseite bei Meru\", 17 Feb 1922, R. E. Fries 1677", typeDesignations.get(4).getText()); |
|
79 |
assertEquals("Syntype: [Tanzania] \"Karagwe\", Stuhlmann 1660", typeDesignations.get(5).getText()); |
|
80 |
assertEquals("Syntype: \"Uganda\", Scott Elliot 7328", typeDesignations.get(6).getText()); |
|
81 |
|
|
82 |
typeDesignations = p.getHeterotypicalGroupTypeDesignations(2); |
|
83 |
assertEquals("Expecting 3 Typedesignation", 3, typeDesignations.size()); |
|
84 |
assertEquals(TypeDesignationType.specimenTypeDesignation, typeDesignations.get(0).getTypeDesignationType()); |
|
85 |
assertEquals("Syntype: [Cameroon], Maitland 226", typeDesignations.get(0).getText()); |
|
86 |
assertEquals("Syntype: [Cameroon], Mildbraed 10814", typeDesignations.get(1).getText()); |
|
87 |
assertEquals("Syntype: [Cameroon] \"Cameroons Mt., 6,000 ft.\", Dunlap 47", typeDesignations.get(2).getText()); |
|
88 |
|
|
89 |
|
|
90 |
} |
|
91 |
|
|
92 |
} |
|
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 |
* tests to avoid regression of #2306 (holotype is only displayed as type) and related bugs |
|
29 |
* |
|
30 |
* @author a.kohlbecker |
|
31 |
* |
|
32 |
*/ |
|
33 |
|
|
34 |
@DataPortalContexts( { DataPortalContext.cichorieae }) |
|
35 |
public class Cichorieae_TypeTest extends CdmDataPortalTestBase{ |
|
36 |
|
|
37 |
|
|
38 |
static UUID cichorium_uuid = UUID.fromString("21d7161a-455e-4f4d-9d61-7f0100c38ff3"); |
|
39 |
|
|
40 |
static UUID scorzonera_tuzgoluensis_Uuid = UUID.fromString("296b4758-048a-47bb-a394-affca64dfc40"); |
|
41 |
|
|
42 |
static UUID lactuca_glandulifera_Uuid = UUID.fromString("6ece0be7-ba4a-4363-b103-4e60429988e5"); |
|
43 |
|
|
44 |
|
|
45 |
@Test |
|
46 |
public void cichorium() throws MalformedURLException { |
|
47 |
TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), cichorium_uuid); |
|
48 |
assertEquals(getContext().prepareTitle("Cichorium"), driver.getTitle()); |
|
49 |
assertEquals("Cichorium L., Sp. Pl.: 813. 1753", p.getAcceptedNameText()); |
|
50 |
List<TypeDesignationElement> typeDesignations = p.getHomotypicalGroupTypeDesignations(); |
|
51 |
assertEquals("Expecting one Typedesignation", 1, typeDesignations.size()); |
|
52 |
assertEquals(TypeDesignationType.nameTypeDesignation, typeDesignations.get(0).getTypeDesignationType()); |
|
53 |
assertEquals("Lectotype (designated by Green 1929: 1781): Cichorium intybus L.", typeDesignations.get(0).getText()); |
|
54 |
} |
|
55 |
|
|
56 |
@Test |
|
57 |
public void scorzonera_tuzgoluensis() throws MalformedURLException { |
|
58 |
TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), scorzonera_tuzgoluensis_Uuid); |
|
59 |
assertEquals(getContext().prepareTitle("Scorzonera tuzgoluensis"), driver.getTitle()); |
|
60 |
List<TypeDesignationElement> typeDesignations = p.getHomotypicalGroupTypeDesignations(); |
|
61 |
assertEquals("Expecting one Typedesignation", 1, typeDesignations.size()); |
|
62 |
assertEquals(TypeDesignationType.specimenTypeDesignation, typeDesignations.get(0).getTypeDesignationType()); |
|
63 |
assertEquals("Holotype: Turkey, B4 Konya, Cihanbeyli, between Gölyazı-Tuzgölü, alt. 908 m, 38°32'33.12\"N, 33°21'11.28\"E, A. Duran, B. Doğan & S. Makbul (KNYA).", typeDesignations.get(0).getText()); |
|
64 |
} |
|
65 |
|
|
66 |
@Test |
|
67 |
public void lactuca_glandulifera() throws MalformedURLException { |
|
68 |
TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), lactuca_glandulifera_Uuid); |
|
69 |
assertEquals(getContext().prepareTitle("Lactuca glandulifera"), driver.getTitle()); |
|
70 |
List<TypeDesignationElement> typeDesignations = p.getHeterotypicalGroupTypeDesignations(1); |
|
71 |
assertEquals("Expecting 7 Typedesignation", 7, typeDesignations.size()); |
|
72 |
|
|
73 |
assertEquals(TypeDesignationType.specimenTypeDesignation, typeDesignations.get(0).getTypeDesignationType()); |
|
74 |
assertEquals("Syntype: [Cameroon] \"Bamenda\", Ledermann 1889", typeDesignations.get(0).getText()); |
|
75 |
assertEquals("Syntype: [Tanzania] \"Kilimandscharo\", Volkens 1238", typeDesignations.get(1).getText()); |
|
76 |
assertEquals("Syntype: [Malawi] \"Kyimbila\", Stolz 306", typeDesignations.get(2).getText()); |
|
77 |
assertEquals("Syntype: [Kenya] \"Mt. Aberdare: Ostseite\", 12 Mar 1922, R. E. Fries 2172", typeDesignations.get(3).getText()); |
|
78 |
assertEquals("Syntype: [Kenya] \"Mt. Kenia: Nordostseite bei Meru\", 17 Feb 1922, R. E. Fries 1677", typeDesignations.get(4).getText()); |
|
79 |
assertEquals("Syntype: [Tanzania] \"Karagwe\", Stuhlmann 1660", typeDesignations.get(5).getText()); |
|
80 |
assertEquals("Syntype: \"Uganda\", Scott Elliot 7328", typeDesignations.get(6).getText()); |
|
81 |
|
|
82 |
typeDesignations = p.getHeterotypicalGroupTypeDesignations(2); |
|
83 |
assertEquals("Expecting 3 Typedesignation", 3, typeDesignations.size()); |
|
84 |
assertEquals(TypeDesignationType.specimenTypeDesignation, typeDesignations.get(0).getTypeDesignationType()); |
|
85 |
assertEquals("Syntype: [Cameroon], Maitland 226", typeDesignations.get(0).getText()); |
|
86 |
assertEquals("Syntype: [Cameroon], Mildbraed 10814", typeDesignations.get(1).getText()); |
|
87 |
assertEquals("Syntype: [Cameroon] \"Cameroons Mt., 6,000 ft.\", Dunlap 47", typeDesignations.get(2).getText()); |
|
88 |
|
|
89 |
|
|
90 |
} |
|
91 |
|
|
92 |
} |
Also available in: Unified diff
CRLF will be replaced by LF issues