root / tmp / trunk / cliente / WorkSpace_WPSClient / extWPSCallejero / test / es / logex / gvsig / wps / TestCastLayer.java @ 26602
History | View | Annotate | Download (699 Bytes)
1 |
package es.logex.gvsig.wps; |
---|---|
2 |
|
3 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
4 |
import com.iver.cit.gvsig.fmap.layers.LayerFactory; |
5 |
import com.iver.cit.gvsig.fmap.layers.XMLException; |
6 |
import junit.framework.TestCase; |
7 |
|
8 |
public class TestCastLayer extends TestCase { |
9 |
|
10 |
@SuppressWarnings("unchecked") |
11 |
public void testLoad() throws XMLException, IllegalAccessException { |
12 |
String className="es.logex.gvsig.fmap.layers.FLyrWPS"; |
13 |
|
14 |
Class clase = null; |
15 |
try {
|
16 |
clase = LayerFactory.getLayerClassForLayerClassName(className); |
17 |
|
18 |
FLayer layer = null;
|
19 |
layer = (FLayer) clase.newInstance(); |
20 |
|
21 |
layer.setName("Municipios");
|
22 |
|
23 |
layer.load(); |
24 |
}catch (Exception e) { |
25 |
e.printStackTrace(); |
26 |
} |
27 |
} |
28 |
|
29 |
} |