01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2005-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.gce.geotiff;
17:
18: import java.util.Iterator;
19:
20: import junit.framework.TestCase;
21:
22: import org.geotools.coverage.grid.io.GridFormatFactorySpi;
23: import org.geotools.coverage.grid.io.GridFormatFinder;
24:
25: /**
26: * Testing {@link GeoTiffFormatFactorySpi}.
27: *
28: * @author Simone Giannecchini
29: *
30: */
31: public class GeoTiffServiceTest extends TestCase {
32:
33: /**
34: * @param arg0
35: */
36: public GeoTiffServiceTest(String arg0) {
37: super (arg0);
38: }
39:
40: public static void main(java.lang.String[] args) {
41: junit.textui.TestRunner.run(GeoTiffServiceTest.class);
42: }
43:
44: public void testIsAvailable() {
45: Iterator list = GridFormatFinder.getAvailableFormats()
46: .iterator();
47: boolean found = false;
48:
49: while (list.hasNext()) {
50: GridFormatFactorySpi fac = (GridFormatFactorySpi) list
51: .next();
52:
53: if (fac instanceof GeoTiffFormatFactorySpi) {
54: found = true;
55:
56: break;
57: }
58: }
59:
60: assertTrue("GeoTiffFormatFactorySpi not registered", found);
61: }
62: }
|