Source Code Cross Referenced for TableColumnDefTest.java in  » GIS » GeoTools-2.4.1 » org » geotools » data » vpf » io » 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.data.vpf.io 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * File is generated by 'Unit Tests Generator' developed under
003:         * 'Web Test Tools' project at http://sf.net/projects/wttools/
004:         * Copyright (C) 2001 "Artur Hefczyc" <kobit@users.sourceforge.net>
005:         * to all 'Web Test Tools' subprojects.
006:         *
007:         * No rigths to files and no responsibility for code generated
008:         * by this tool are belonged to author of 'unittestsgen' utility.
009:         *
010:         */
011:        package org.geotools.data.vpf.io;
012:
013:        import java.io.File;
014:        import java.io.IOException;
015:
016:        import junit.framework.Test;
017:        import junit.framework.TestCase;
018:        import junit.framework.TestSuite;
019:
020:        import org.geotools.data.vpf.ifc.DataTypesDefinition;
021:        import org.geotools.data.vpf.ifc.FileConstants;
022:        import org.geotools.test.TestData;
023:
024:        // TODO TableInputStream was deprecated in 2.0.x and has been removed 
025:        // in 2.2.x. This file needs to be updated and tests re-enabled.
026:
027:        /**
028:         * File <code>TableColumnDefTest.java</code> is automaticaly generated by
029:         * 'unittestsgen' application. Code generator is created for java
030:         * sources and for 'junit' package by "Artur Hefczyc"
031:         * <kobit@users.sourceforge.net><br/>
032:         * You should fulfil test methods with proper code for testing
033:         * purpose. All methods where you should put your code are below and
034:         * their names starts with 'test'.<br/>
035:         * You can run unit tests in many ways, however prefered are:
036:         * <ul>
037:         *   <li>Run tests for one class only, for example for this class you
038:         *       can run tests with command:
039:         *     <pre>
040:         *       java -cp "jar/thisjarfile.jar;lib/junit.jar" org.geotools.vpf.TableColumnDefTest
041:         *     </pre>
042:         *   </li>
043:         *   <li>Run tests for all classes in one command call. Code generator
044:         *       creates also <code>TestAll.class</code> which runs all
045:         *       available tests:
046:         *     <pre>
047:         *       java -cp "jar/thisjarfile.jar;lib/junit.jar" TestAll
048:         *     </pre>
049:         *   </li>
050:         *   <li>But the most prefered way is to run all tests from
051:         *     <em>Ant</em> just after compilation process finished.<br/>
052:         *     To do it. You need:
053:         *     <ol>
054:         *       <li>Ant package from
055:         *         <a href="http://jakarta.apache.org/">Ant</a>
056:         *       </li>
057:         *       <li>JUnit package from
058:         *         <a href="http://www.junit.org/">JUnit</a>
059:         *       </li>
060:         *       <li>Put some code in your <code>build.xml</code> file
061:         *         to tell Ant how to test your package. Sample code for
062:         *         Ant's <code>build.xml</code> you can find in created file:
063:         *         <code>sample-junit-build.xml</code>. And remember to have
064:         *         <code>junit.jar</code> in CLASSPATH <b>before</b> you run Ant.
065:         *         To generate reports by ant you must have <code>xalan.jar</code>
066:         *         in your <code>ANT_HOME/lib/</code> directory.
067:         *       </li>
068:         *     </ol>
069:         *   </li>
070:         * </ul>
071:         * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/unsupported/vpf/src/test/java/org/geotools/data/vpf/io/TableColumnDefTest.java $
072:         */
073:        public class TableColumnDefTest extends TestCase implements 
074:                DataTypesDefinition, FileConstants {
075:            /**
076:             * Instance of tested class.
077:             */
078:            protected TableColumnDef varTableColumnDef;
079:
080:            /**
081:             * Public constructor for creating testing class.
082:             */
083:            public TableColumnDefTest(String name) {
084:                super (name);
085:            } // end of TableColumnDefTest(String name)
086:
087:            /**
088:             * This main method is used for run tests for this class only
089:             * from command line.
090:             */
091:            public static void main(String[] args) {
092:                junit.textui.TestRunner.run(suite());
093:            } // end of main(Stringp[] args)
094:
095:            /**
096:             * This method is called every time before particular test execution.
097:             * It creates new instance of tested class and it can perform some more
098:             * actions which are necessary for performs tests.
099:             */
100:            protected void setUp() throws IOException {
101:
102:                //  	File file = TestData.file( this, "dnc13/dht" );
103:                //  	TableInputStream tis = new TableInputStream( file.getPath() );
104:                //  	
105:                //	TableHeader thead = (TableHeader)tis.getHeader();
106:                //    varTableColumnDef = (TableColumnDef)thead.getColumnDefs().get(0);
107:                //    tis.close();
108:            } // end of setUp()
109:
110:            /**
111:             * Returns all tests which should be performed for testing class.
112:             * By default it returns only name of testing class. Instance of this
113:             * is then created with its constructor.
114:             */
115:            public static Test suite() {
116:                return new TestSuite(TableColumnDefTest.class);
117:            } // end of suite()
118:
119:            /**
120:             * Method for testing original source method:
121:             * java.lang.String getColDesc()
122:             * from tested class
123:             */
124:            public void XtestGetColDesc() {
125:                assertEquals("Cheking column description.", "Row id",
126:                        varTableColumnDef.getColDesc());
127:            } // end of testGetColDesc()
128:
129:            /**
130:             * Method for testing original source method:
131:             * int getColumnSize()
132:             * from tested class
133:             */
134:            public void XtestGetColumnSize() {
135:                assertEquals("Cheking column size.", DATA_LONG_INTEGER_LEN,
136:                        varTableColumnDef.getColumnSize());
137:            } // end of testGetColumnSize()
138:
139:            /**
140:             * Method for testing original source method:
141:             * int getElementsNumber()
142:             * from tested class
143:             */
144:            public void XtestGetElementsNumber() {
145:                assertEquals("Cheking column size.", 1, varTableColumnDef
146:                        .getElementsNumber());
147:            } // end of testGetElementsNumber()
148:
149:            /**
150:             * Method for testing original source method:
151:             * char getKeyType()
152:             * from tested class
153:             */
154:            public void XtestGetKeyType() {
155:                assertEquals("Cheking key type.", KEY_PRIMARY,
156:                        varTableColumnDef.getKeyType());
157:            } // end of testGetKeyType()
158:
159:            /**
160:             * Method for testing original source method:
161:             * java.lang.String getName()
162:             * from tested class
163:             */
164:            public void XtestGetName() {
165:                assertEquals("Cheking column name.", "id", varTableColumnDef
166:                        .getName());
167:            } // end of testGetName()
168:
169:            /**
170:             * Method for testing original source method:
171:             * java.lang.String getNarrTable()
172:             * from tested class
173:             */
174:            public void XtestGetNarrTable() {
175:                assertNull("Cheking narrative table name.", varTableColumnDef
176:                        .getNarrTable());
177:            } // end of testGetNarrTable()
178:
179:            /**
180:             * Method for testing original source method:
181:             * java.lang.String getThematicIdx()
182:             * from tested class
183:             */
184:            public void XtestGetThematicIdx() {
185:                assertNull("Cheking column name.", varTableColumnDef
186:                        .getThematicIdx());
187:            } // end of testGetThematicIdx()
188:
189:            /**
190:             * Method for testing original source method:
191:             * char getType()
192:             * from tested class
193:             */
194:            public void XtestGetType() {
195:                assertEquals("Cheking column type.", DATA_LONG_INTEGER,
196:                        varTableColumnDef.getType());
197:            } // end of testGetType()
198:
199:            /**
200:             * Method for testing original source method:
201:             * java.lang.String getValDescTableName()
202:             * from tested class
203:             */
204:            public void XtestGetValDescTableName() {
205:                assertNull("Cheking description table name.", varTableColumnDef
206:                        .getValDescTableName());
207:            } // end of testGetValDescTableName()
208:
209:            /**
210:             * Method for testing original source method:
211:             * boolean isNumeric()
212:             * from tested class
213:             */
214:            public void XtestIsNumeric() {
215:                assertTrue("Checking if it is numeric column.",
216:                        varTableColumnDef.isNumeric());
217:            } // end of testIsNumeric()
218:
219:            public void testNull() {
220:                //TODO delete this when this file has been updated - prevents maven from throwing an exception
221:            }
222:
223:        } // end of TableColumnDefTest
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.