Project

General

Profile

Download (2.25 KB) Statistics
| Branch: | Tag: | Revision:
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.cdm.ext.geo;
11

    
12
import static org.junit.Assert.fail;
13

    
14
import javax.xml.stream.XMLStreamException;
15

    
16
import junit.framework.Assert;
17

    
18
import org.apache.log4j.Logger;
19
import org.junit.Before;
20
import org.junit.BeforeClass;
21
import org.junit.Test;
22

    
23
/**
24
 * @author a.mueller
25
 * @date 12.08.2011
26
 *
27
 */
28
public class GeoServiceAreaTest {
29
	private static final Logger logger = Logger.getLogger(GeoServiceAreaTest.class);
30

    
31
	/**
32
	 * @throws java.lang.Exception
33
	 */
34
	@BeforeClass
35
	public static void setUpBeforeClass() throws Exception {
36
	}
37

    
38
	/**
39
	 * @throws java.lang.Exception
40
	 */
41
	@Before
42
	public void setUp() throws Exception {
43
	}
44

    
45
// ********************************** TESTS ****************************************	
46
	
47
	/**
48
	 * Test method for {@link eu.etaxonomy.cdm.ext.geo.GeoServiceArea#add(java.lang.String, java.lang.String, java.lang.String)}.
49
	 */
50
	@Test
51
	public void testAdd() {
52
		logger.warn("Not yet implemented");
53
	}
54

    
55
	/**
56
	 * Test method for {@link eu.etaxonomy.cdm.ext.geo.GeoServiceArea#getAreasMap()}.
57
	 */
58
	@Test
59
	public void testGetAreas() {
60
		logger.warn("Not yet implemented");
61
	}
62

    
63
	/**
64
	 * Test method for {@link eu.etaxonomy.cdm.ext.geo.GeoServiceArea#valueOf(java.lang.String)}.
65
	 */
66
	@Test
67
	public void testValueOf() {
68
		String input = "<?xml version=\"1.0\" ?><mapService xmlns=\"http://www.etaxonomy.eu/cdm\" type=\"editMapService\"><area><layer>vmap0_as_bnd_political_boundary_a</layer><field>nam</field><value>PULAU BANGKA#SUMATERA SELATAN</value></area></mapService>";
69
		GeoServiceArea areas = GeoServiceArea.valueOf(input);
70
		try {
71
			Assert.assertNotNull("Result must not be null", areas);
72
			Assert.assertEquals("Input string must be equal to output string", input, areas.toXml());
73
		} catch (XMLStreamException e) {
74
			fail();
75
		}
76
	}
77

    
78
	/**
79
	 * Test method for {@link eu.etaxonomy.cdm.ext.geo.GeoServiceArea#toXml()}.
80
	 */
81
	@Test
82
	public void testToXml() {
83
		logger.warn("Not yet implemented");
84
	}
85

    
86
}
(2-2/2)