Source Code Cross Referenced for ScriptTest.java in  » GIS » GeoTools-2.4.1 » org » geotools » referencing » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.referencing 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *    GeoTools - OpenSource mapping toolkit
003:         *    http://geotools.org
004:         *    (C) 2004-2006, Geotools Project Managment Committee (PMC)
005:         *    (C) 2002, Institut de Recherche pour le Développement
006:         *    
007:         *    This library is free software; you can redistribute it and/or
008:         *    modify it under the terms of the GNU Lesser General Public
009:         *    License as published by the Free Software Foundation; either
010:         *    version 2.1 of the License, or (at your option) any later version.
011:         *
012:         *    This library is distributed in the hope that it will be useful,
013:         *    but WITHOUT ANY WARRANTY; without even the implied warranty of
014:         *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
015:         *    Lesser General Public License for more details.
016:         */
017:        package org.geotools.referencing;
018:
019:        // J2SE dependencies
020:        import java.io.FileNotFoundException;
021:        import java.io.IOException;
022:        import java.io.InputStreamReader;
023:        import java.io.LineNumberReader;
024:        import java.net.URL;
025:
026:        // JUnit dependencies
027:        import junit.framework.Test;
028:        import junit.framework.TestCase;
029:        import junit.framework.TestSuite;
030:
031:        // OpenGIS dependencies
032:        import org.opengis.referencing.FactoryException;
033:        import org.opengis.referencing.operation.TransformException;
034:
035:        // Geotools dependencies
036:        import org.geotools.test.TestData;
037:
038:        /**
039:         * Run a test scripts. Scripts include a test suite provided by OpenGIS.
040:         * Each script contains a list of source and target coordinates reference systems (in WKT),
041:         * source coordinate points and expected coordinate points after the transformation from
042:         * source CRS to target CRS.
043:         * <p>
044:         * This is probably the most important test case for the whole CRS module.
045:         *
046:         * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/test/java/org/geotools/referencing/ScriptTest.java $
047:         * @version $Id: ScriptTest.java 27848 2007-11-12 13:10:32Z desruisseaux $
048:         * @author Yann Cézard
049:         * @author Remi Eve
050:         * @author Martin Desruisseaux
051:         */
052:        public final class ScriptTest extends TestCase {
053:            /**
054:             * Run all tests from the command line.
055:             */
056:            public static void main(final String[] args) throws Exception {
057:                org.geotools.util.logging.Logging.GEOTOOLS
058:                        .forceMonolineConsoleOutput();
059:                junit.textui.TestRunner.run(suite());
060:            }
061:
062:            /**
063:             * Returns the test suite.
064:             */
065:            public static Test suite() {
066:                return new TestSuite(ScriptTest.class);
067:            }
068:
069:            /**
070:             * Constructs a test case with the given name.
071:             */
072:            public ScriptTest(final String name) {
073:                super (name);
074:            }
075:
076:            /**
077:             * Run the specified test script.
078:             *
079:             * @throws Exception If a test failed.
080:             */
081:            private void runScript(final String filename) throws Exception {
082:                final LineNumberReader in = TestData.openReader(this , filename);
083:                final TestScript test = new TestScript(in);
084:                test.executeAll();
085:                in.close();
086:            }
087:
088:            /**
089:             * Run "AbridgedMolodensky.txt".
090:             *
091:             * @throws Exception If a test failed.
092:             */
093:            public void testAbridgedMolodesky() throws Exception {
094:                runScript("scripts/AbridgedMolodensky.txt");
095:            }
096:
097:            /**
098:             * Run "Molodensky.txt".
099:             *
100:             * @throws IOException If {@link #MT_MOLODENSKY_SCRIPT} can't be read.
101:             * @throws FactoryException if a line can't be parsed.
102:             * @throws TransformException if the transformation can't be run.
103:             */
104:            public void testMolodesky() throws Exception {
105:                runScript("scripts/Molodensky.txt");
106:            }
107:
108:            /**
109:             * Run "Simple.txt".
110:             *
111:             * @throws Exception If a test failed.
112:             */
113:            public void testSimple() throws Exception {
114:                runScript("scripts/Simple.txt");
115:            }
116:
117:            /**
118:             * Run "Projections.txt".
119:             *
120:             * @throws Exception If a test failed.
121:             */
122:            public void testProjections() throws Exception {
123:                runScript("scripts/Projections.txt");
124:            }
125:
126:            /**
127:             * Run "Mercator.txt".
128:             *
129:             * @throws Exception If a test failed.
130:             */
131:            public void testMercator() throws Exception {
132:                runScript("scripts/Mercator.txt");
133:            }
134:
135:            /**
136:             * Run the "ObliqueMercator.txt".
137:             *
138:             * @throws Exception If a test failed.
139:             */
140:            public void testObliqueMercator() throws Exception {
141:                runScript("scripts/ObliqueMercator.txt");
142:            }
143:
144:            /**
145:             * Run "TransverseMercator.txt".
146:             *
147:             * @throws Exception If a test failed.
148:             */
149:            public void testTransverseMercator() throws Exception {
150:                runScript("scripts/TransverseMercator.txt");
151:            }
152:
153:            /**
154:             * Run "AlbersEqualArea.txt"
155:             *
156:             * @throws Exception If a test failed.
157:             */
158:            public void testAlbersEqualArea() throws Exception {
159:                runScript("scripts/AlbersEqualArea.txt");
160:            }
161:
162:            /**
163:             * Run "LambertAzimuthalEqualArea.txt".
164:             *
165:             * @throws Exception If a test failed.
166:             */
167:            public void testLambertAzimuthalEqualArea() throws Exception {
168:                runScript("scripts/LambertAzimuthalEqualArea.txt");
169:            }
170:
171:            /**
172:             * Run "LambertConic.txt".
173:             *
174:             * @throws Exception If a test failed.
175:             */
176:            public void testLambertConic() throws Exception {
177:                runScript("scripts/LambertConic.txt");
178:            }
179:
180:            /**
181:             * Run "Stereographic.txt".
182:             *
183:             * @throws Exception If a test failed.
184:             */
185:            public void testStereographic() throws Exception {
186:                runScript("scripts/Stereographic.txt");
187:            }
188:
189:            /**
190:             * Run "Orthographic.txt".
191:             *
192:             * @throws Exception If a test failed.
193:             */
194:            public void testOrthographic() throws Exception {
195:                runScript("scripts/Orthographic.txt");
196:            }
197:
198:            /**
199:             * Run "NZMG.txt"
200:             * 
201:             * @throws Exception If a test failed.
202:             */
203:            public void testNZMG() throws Exception {
204:                runScript("scripts/NZMG.txt");
205:            }
206:
207:            /**
208:             * Run "Krovak.txt"
209:             * 
210:             * @throws Exception If a test failed.
211:             */
212:            public void testKrovak() throws Exception {
213:                runScript("scripts/Krovak.txt");
214:            }
215:
216:            /**
217:             * Run "OpenGIS.txt".
218:             *
219:             * @throws Exception If a test failed.
220:             */
221:            //    public void testOpenGIS() throws Exception {
222:            //        runScript("scripts/OpenGIS.txt");
223:            //    }
224:            /**
225:             * Run "NADCON.txt"
226:             *
227:             * @throws Exception If a test failed.
228:             */
229:            //    public void testNADCON() throws Exception {
230:            //        runScript("scripts/NADCON.txt");
231:            //    }
232:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.