Revision 12333 trunk/libraries/libRaster/src-test/org/gvsig/raster/dataset/io/TestWriterParams.java

View differences:

TestWriterParams.java
30 30
 * Prueba para la inserci?n y extracci?n de par?metros de los driver de escritura.
31 31
 * Lee primero los valores asignados en la inicializaci?n y luego hace algunas
32 32
 * variaciones comprobando que los resultados sean correctos.
33
 * 
33
 *
34 34
 * @author Nacho Brodin (nachobrodin@gmail.com)
35 35
 *
36 36
 */
37 37
public class TestWriterParams extends TestCase {
38 38
	private GeoRasterWriter grw = null;
39 39
	private Params wp = null;
40
	
40

  
41 41
	public void start() {
42 42
		this.setUp();
43 43
		this.testStack();
44 44
	}
45
	
45

  
46 46
	static {
47 47
		RasterLibrary.wakeUp();
48 48
	}
49
	
49

  
50 50
	public void setUp() {
51 51
		System.err.println("TestWriterParams running...");
52 52
		//Extensi?n gestionada por gdal
......
59 59
		}
60 60
		wp = grw.getParams();
61 61
	}
62
	
62

  
63 63
	public void testStack(){
64
		String blockSize = wp.getParamById("blocksize").defaultValue;
65
		//String georef = wp.getParamById("georef").defaultValue;
66
		String photometric = wp.getParamById("photometric").defaultValue;
67
		String interleave = wp.getParamById("interleave").defaultValue;
68
		String compression = wp.getParamById("compression").defaultValue;
69
		String tfw = wp.getParamById("tfw").defaultValue;
70
		
64
		String blockSize = (String) wp.getParamById("blocksize").defaultValue;
65
		//String georef = (String) wp.getParamById("georef").defaultValue;
66
		String photometric = (String) wp.getParamById("photometric").defaultValue;
67
		String interleave = (String) wp.getParamById("interleave").defaultValue;
68
		String compression = (String) wp.getParamById("compression").defaultValue;
69
		String tfw = (String) wp.getParamById("tfw").defaultValue;
70

  
71 71
		assertEquals(blockSize, "512");
72 72
		//assertEquals(georef, "true");
73 73
		assertEquals(photometric, "RGB");
74 74
		assertEquals(interleave, "BAND");
75 75
		assertEquals(compression, "NONE");
76 76
		assertEquals(tfw, "false");
77
		
77

  
78 78
		wp.changeParamValue("blocksize", "256");
79 79
		//wp.changeParamValue("georef", "false");
80 80
		wp.changeParamValue("photometric", "MINISBLACK");
81 81
		wp.changeParamValue("interleave", "PIXEL");
82 82
		wp.changeParamValue("compression", "12");
83 83
		wp.changeParamValue("tfw", "true");
84
		
85
		blockSize = wp.getParamById("blocksize").defaultValue;
86
		//georef = wp.getParamById("georef").defaultValue;
87
		photometric = wp.getParamById("photometric").defaultValue;
88
		interleave = wp.getParamById("interleave").defaultValue;
89
		compression = wp.getParamById("compression").defaultValue;
90
		tfw = wp.getParamById("tfw").defaultValue;
91
		
84

  
85
		blockSize = (String) wp.getParamById("blocksize").defaultValue;
86
		//georef = (String) wp.getParamById("georef").defaultValue;
87
		photometric = (String) wp.getParamById("photometric").defaultValue;
88
		interleave = (String) wp.getParamById("interleave").defaultValue;
89
		compression = (String) wp.getParamById("compression").defaultValue;
90
		tfw = (String) wp.getParamById("tfw").defaultValue;
91

  
92 92
		assertEquals(blockSize, "256");
93 93
		//assertEquals(georef, "false");
94 94
		assertEquals(photometric, "MINISBLACK");

Also available in: Unified diff