Project

General

Profile

Revision 3ca67b85

ID3ca67b851d59265fe8c1a917bd518ecb9547b437
Parent 48cdd986
Child 1b996cca

Added by Andreas Kohlbecker about 2 years ago

ref #7217 creating test to reproduce long lat parsing problem

View differences:

cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/parser/location/CoordinateConverterTest.java
99 99
        Assert.assertTrue("Pattern with acute accent must be recognised", conversionResults.patternRecognised);
100 100
        Assert.assertTrue("Pattern with acute accent must be recognised", conversionResults.conversionSuccessful);
101 101

  
102
        conversionResults = coordinateConverter.tryConvert("35" + DEGREE_SIGN + "1" + ACUTE_ACCENT + "34" + ACUTE_ACCENT + "" + ACUTE_ACCENT + "W");
102
        conversionResults = coordinateConverter.tryConvert("35" + DEGREE_SIGN + "1" + ACUTE_ACCENT + "34" + ACUTE_ACCENT + ACUTE_ACCENT + "W");
103 103
        Assert.assertTrue("Pattern with acute accent for seconds must be recognised", conversionResults.patternRecognised);
104 104
        Assert.assertTrue("Pattern with acute accent for seconds  must be recognised", conversionResults.conversionSuccessful);
105 105

  
......
149 149
        Assert.assertTrue("Pattern with right double quotation and whitespace must be successful", conversionResults.conversionSuccessful);
150 150
	}
151 151

  
152
	@Test
153
    public void testIssue7217() {
154
	    // 49°13'39.0''N
155
	    ConversionResults conversionResults = coordinateConverter.tryConvert("49" + DEGREE_SIGN + "13" + APOSTROPHE +"39.0" + APOSTROPHE + APOSTROPHE + "N");
156
        Assert.assertTrue(conversionResults.conversionComments, conversionResults.patternRecognised);
157
        Assert.assertTrue("Pattern with APOSTROPHE for minute must be recognised", conversionResults.patternRecognised);
158
        Assert.assertTrue("Pattern with APOSTROPHE end for minute  must be successful", conversionResults.conversionSuccessful);
159

  
160
        // 20°00'31.5''E
161
        conversionResults = coordinateConverter.tryConvert("20" + DEGREE_SIGN + "00" + APOSTROPHE +"31.5" + APOSTROPHE + APOSTROPHE + "E");
162
        Assert.assertTrue(conversionResults.conversionComments, conversionResults.patternRecognised);
163
        Assert.assertTrue("Pattern with APOSTROPHE for minute and second must be recognised", conversionResults.patternRecognised);
164
        Assert.assertTrue("Pattern with APOSTROPHE for minute and second must be successful", conversionResults.conversionSuccessful);
165
	}
166

  
167

  
152 168
	/**
153 169
	 * Test method for {@link eu.etaxonomy.cdm.strategy.parser.location.CoordinateConverter#addCustomPattern(eu.etaxonomy.cdm.strategy.parser.location.CoordinateConverter.CustomPatternIn)}.
154 170
	 */

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)