01: package org.geotools.gce.image;
02:
03: import java.util.Iterator;
04:
05: import junit.framework.TestCase;
06:
07: import org.geotools.coverage.grid.io.GridFormatFactorySpi;
08: import org.geotools.coverage.grid.io.GridFormatFinder;
09:
10: public class ServiceTest extends TestCase {
11:
12: public ServiceTest() {
13: super ();
14: // TODO Auto-generated constructor stub
15: }
16:
17: public ServiceTest(String arg0) {
18: super (arg0);
19: // TODO Auto-generated constructor stub
20: }
21:
22: public static void main(java.lang.String[] args) {
23: junit.textui.TestRunner.run(ServiceTest.class);
24: }
25:
26: public void testIsAvailable() {
27: Iterator list = GridFormatFinder.getAvailableFormats()
28: .iterator();
29: boolean found = false;
30: GridFormatFactorySpi fac;
31: while (list.hasNext()) {
32: fac = (GridFormatFactorySpi) list.next();
33:
34: if (fac instanceof WorldImageFormatFactory) {
35: found = true;
36:
37: break;
38: }
39: }
40:
41: assertTrue("WorldImageFormatFactory not registered", found);
42: }
43: }
|