comparison gnv/src/test/java/de/intevation/gnv/action/mapviewer/parser/ExternalCallParserTestCase.java @ 681:15ac78a91d1b

Removed trailing whitespace. gnv/trunk@852 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 29 Mar 2010 08:04:15 +0000
parents 24a6c0cb0a62
children d49e8695786c
comparison
equal deleted inserted replaced
680:ba3370dbc8c5 681:15ac78a91d1b
13 13
14 import de.intevation.gnv.artifactdatabase.objects.map.Layer; 14 import de.intevation.gnv.artifactdatabase.objects.map.Layer;
15 import de.intevation.gnv.artifactdatabase.objects.map.MapService; 15 import de.intevation.gnv.artifactdatabase.objects.map.MapService;
16 16
17 public class ExternalCallParserTestCase extends TestCase { 17 public class ExternalCallParserTestCase extends TestCase {
18 18
19 /** 19 /**
20 * the logger, used to log exceptions and additonaly information 20 * the logger, used to log exceptions and additonaly information
21 */ 21 */
22 private static Logger log = null; 22 private static Logger log = null;
23 23
24 static { 24 static {
25 BasicConfigurator.configure(); 25 BasicConfigurator.configure();
26 log = Logger.getLogger(ExternalCallParserTestCase.class); 26 log = Logger.getLogger(ExternalCallParserTestCase.class);
27 } 27 }
28 28
29 public ExternalCallParserTestCase() { 29 public ExternalCallParserTestCase() {
30 super(); 30 super();
31 } 31 }
32 32
33 public ExternalCallParserTestCase(String name) { 33 public ExternalCallParserTestCase(String name) {
34 super(name); 34 super(name);
35 } 35 }
36 36
37 public void testParseExternalCall() { 37 public void testParseExternalCall() {
38 log.debug("Execute testParseExternalCall"); 38 log.debug("Execute testParseExternalCall");
39 try { 39 try {
40 InputStream inputStream = new FileInputStream( 40 InputStream inputStream = new FileInputStream(
41 new File("src/test/ressources/externalinterfacecall.xml")); 41 new File("src/test/ressources/externalinterfacecall.xml"));
52 log.debug(mapServices.size()+"Mapservices parsed"); 52 log.debug(mapServices.size()+"Mapservices parsed");
53 assertEquals(2, mapServices.size()); 53 assertEquals(2, mapServices.size());
54 Iterator<MapService> it = mapServices.iterator(); 54 Iterator<MapService> it = mapServices.iterator();
55 MapService mapService1 = it.next(); 55 MapService mapService1 = it.next();
56 MapService mapService2 = it.next(); 56 MapService mapService2 = it.next();
57 57
58 log.debug("MapService 1"); 58 log.debug("MapService 1");
59 log.debug("ID: "+mapService1.getID()); 59 log.debug("ID: "+mapService1.getID());
60 log.debug("URL: "+mapService1.getURL()); 60 log.debug("URL: "+mapService1.getURL());
61 log.debug("TYPE: "+mapService1.getType()); 61 log.debug("TYPE: "+mapService1.getType());
62 Collection<Layer> layer1 = mapService1.getLayer(); 62 Collection<Layer> layer1 = mapService1.getLayer();
64 assertEquals(5, layer1.size()); 64 assertEquals(5, layer1.size());
65 Iterator<Layer> layerIt1 = layer1.iterator(); 65 Iterator<Layer> layerIt1 = layer1.iterator();
66 while(layerIt1.hasNext()){ 66 while(layerIt1.hasNext()){
67 log.debug(layerIt1.next().toString()); 67 log.debug(layerIt1.next().toString());
68 } 68 }
69 69
70 log.debug("MapService 2"); 70 log.debug("MapService 2");
71 log.debug("ID: "+mapService2.getID()); 71 log.debug("ID: "+mapService2.getID());
72 log.debug("URL: "+mapService2.getURL()); 72 log.debug("URL: "+mapService2.getURL());
73 log.debug("TYPE: "+mapService2.getType()); 73 log.debug("TYPE: "+mapService2.getType());
74 Collection<Layer> layer2 = mapService2.getLayer(); 74 Collection<Layer> layer2 = mapService2.getLayer();
76 assertEquals(2, layer2.size()); 76 assertEquals(2, layer2.size());
77 Iterator<Layer> layerIt2 = layer2.iterator(); 77 Iterator<Layer> layerIt2 = layer2.iterator();
78 while(layerIt2.hasNext()){ 78 while(layerIt2.hasNext()){
79 log.debug(layerIt2.next().toString()); 79 log.debug(layerIt2.next().toString());
80 } 80 }
81 81
82 } catch (Exception e) { 82 } catch (Exception e) {
83 log.error(e,e); 83 log.error(e,e);
84 fail(); 84 fail();
85 } 85 }
86 86
87 } 87 }
88 88
89 } 89 }

http://dive4elements.wald.intevation.org