01: /*
02: * Geotools 2 - OpenSource mapping toolkit
03: * (C) 2006, Geotools Project Managment Committee (PMC)
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: */
19: package org.geotools.gce.imagepyramid;
20:
21: import java.util.Iterator;
22:
23: import junit.framework.TestCase;
24: import junit.textui.TestRunner;
25:
26: import org.geotools.coverage.grid.io.GridFormatFactorySpi;
27: import org.geotools.coverage.grid.io.GridFormatFinder;
28:
29: /**
30: * @author Simone Giannecchini
31: * @since 2.3
32: *
33: */
34: public class ImagePyramidServiceTest extends TestCase {
35:
36: /**
37: *
38: */
39: public ImagePyramidServiceTest() {
40:
41: }
42:
43: /**
44: * @param args
45: */
46: public static void main(String[] args) {
47: TestRunner.run(ImagePyramidServiceTest.class);
48:
49: }
50:
51: public void testIsAvailable() {
52: Iterator list = GridFormatFinder.getAvailableFormats()
53: .iterator();
54: boolean found = false;
55:
56: while (list.hasNext()) {
57: final GridFormatFactorySpi fac = (GridFormatFactorySpi) list
58: .next();
59:
60: if (fac instanceof ImagePyramidFormatFactory) {
61: found = true;
62:
63: break;
64: }
65: }
66:
67: assertTrue("ImageMosaicFormatFactorySpi not registered", found);
68: }
69: }
|