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.imagemosaic;
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: *
32: */
33: public class ImageMosaicServiceTest extends TestCase {
34:
35: /**
36: *
37: */
38: public ImageMosaicServiceTest() {
39:
40: }
41:
42: /**
43: * @param args
44: */
45: public static void main(String[] args) {
46: TestRunner.run(ImageMosaicServiceTest.class);
47:
48: }
49:
50: public void testIsAvailable() {
51: Iterator list = GridFormatFinder.getAvailableFormats()
52: .iterator();
53: boolean found = false;
54:
55: while (list.hasNext()) {
56: final GridFormatFactorySpi fac = (GridFormatFactorySpi) list
57: .next();
58:
59: if (fac instanceof ImageMosaicFormatFactory) {
60: found = true;
61:
62: break;
63: }
64: }
65:
66: assertTrue("ImageMosaicFormatFactorySpi not registered", found);
67: }
68: }
|