root/tools/routingservice/branches/wrs-2.0/src/test/JSONParserTest.java

Revision 340, 0.6 KB (checked in by anton, 14 months ago)

WRS code cleanup

Line 
1package test;
2
3import util.format.JSONParser;
4import junit.framework.TestCase;
5
6public class JSONParserTest extends TestCase
7{
8       
9        private String json;
10        private JSONParser parser;
11       
12        public JSONParserTest(String name)
13        {
14                super(name);
15        }
16
17        protected void setUp() throws Exception
18        {
19                super.setUp();
20                parser = new JSONParser();
21        }
22
23        protected void tearDown() throws Exception
24        {
25                super.tearDown();
26                parser = null;
27                json = null;
28        }
29       
30        public void testParseInput()
31        {
32                json = "{\"points\":\"139.58928 35.541861, 139.722126 35.644007, 139.718928 35.6441861\", \"crs\":\"epsg:4326, epsg:54004\"}";
33                assertTrue(parser.parseInput(json).iterator().hasNext());
34        }
35
36}
Note: See TracBrowser for help on using the browser.