|
Revision 340, 0.6 KB
(checked in by anton, 14 months ago)
|
|
WRS code cleanup
|
| Line | |
|---|
| 1 | package test; |
|---|
| 2 | |
|---|
| 3 | import util.format.JSONParser; |
|---|
| 4 | import junit.framework.TestCase; |
|---|
| 5 | |
|---|
| 6 | public 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 | } |
|---|