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


org.geotools.data.DataTestCase

All known Subclasses:   org.geotools.feature.FeatureTypeTest,  org.geotools.data.mysql.MySQLDataStoreAPITest,  org.geotools.data.postgis.collection.PostgisFeatureCollectionOnlineTest,  org.geotools.data.memory.MemoryFeatureCollectionTest,  org.geotools.data.memory.MemoryDataStoreTest,  org.geotools.validation.IntegrityValidationTest,  org.geotools.brewer.color.StyleGeneratorOnlineTest,  org.geotools.data.AbstractDataStoreTest,  org.geotools.brewer.color.StyleGeneratorTest,  org.geotools.validation.FeatureValidationTest,  org.geotools.data.postgis.AbstractVersionedPostgisDataTestCase,  org.geotools.validation.ValidationProcessorTest,  org.geotools.caching.MemoryDataStoreTest,  org.geotools.data.oracle.QuickOracleOnlineTest,  org.geotools.caching.CacheDataStoreTest,  org.geotools.data.feature.memory.MemoryDataAccess_GTAPI_Test,  org.geotools.data.collection.CollectionDataStoreTest,  org.geotools.validation.ValidationPlugInTester,  org.geotools.data.DataUtilitiesTest,  org.geotools.validation.relate.MemoryLeakOnlineTest,  org.geotools.feature.visitor.VisitorCalculationTest,  org.geotools.data.FilteringFeatureReaderTest,  org.geotools.data.postgis.AbstractPostgisDataTestCase,
DataTestCase
public class DataTestCase extends TestCase (Code)
A set of constructs and utility methods used to test the data module.

By isolating a common set of Feature s, FeatureType s and Filter s we are able to reduce the amount of overhead in setting up new tests.

We have also special cased DataTestCase.assertEquals(Geometry,Geometry) to work around Geometry.equals( Object ) not working as expected.

This code has been made part of the public geotools.jar to provide a starting point for test cases involving Data constructs.


version:
   $Id: DataTestCase.java 22600 2006-11-04 09:37:58Z jgarnett $
author:
   Jody Garnett, Refractions Research sample-data


Field Summary
protected  FilterFactoryff
    
protected  GeometryFactorygf
    
protected  EnvelopelakeBounds
    
protected  Feature[]lakeFeatures
    
protected  FeatureTypelakeType
    
protected  FeaturenewRiver
    
protected  FeaturenewRoad
    
protected  Enveloperd12Bounds
    
protected  Filterrd12Filter
    
protected  Filterrd1Filter
    
protected  Filterrd2Filter
    
protected  EnveloperiverBounds
    
protected  Feature[]riverFeatures
    
protected  FeatureTyperiverType
    
protected  EnveloperoadBounds
    
protected  SimpleFeature[]roadFeatures
    
protected  FeatureTyperoadType
    
protected  Filterrv1Filter
    
protected  FeatureTypesubRiverType
    
protected  FeatureTypesubRoadType
    

Constructor Summary
public  DataTestCase(String name)
     Creates a default test case with the given name.

Method Summary
protected  voidassertEquals(Geometry expected, Geometry actual)
     Compares two geometries for equality.
protected  voidassertEquals(String message, Geometry expected, Geometry actual)
     Compares two geometries for equality.
protected  intcount(FeatureReader reader)
     Counts the number of Features returned by the specified reader.
protected  intcount(FeatureWriter writer)
     Counts the number of Features in the specified writer.
protected  voiddataSetUp()
     Loads the data.
public  LineStringline(int[] xy)
     Creates a line from the specified (x,y) coordinates.
public  MultiLineStringlines(int[][] xy)
     Creates a multiline from the specified (x,y) coordinates.
public  Polygonpolygon(int[] xy)
     Creates a polygon from the specified (x,y) coordinates.
public  Polygonpolygon(int[] xy, int[][] holes)
     Creates a line from the specified (x,y) coordinates and an arbitrary amount of holes.
public  LinearRingring(int[] xy)
     Creates a ring from the specified (x,y) coordinates.
protected  voidsetUp()
     Invoked before a test is run.
protected  voidtearDown()
     Set all data references to null , allowing garbage collection.

Field Detail
ff
protected FilterFactory ff(Code)



gf
protected GeometryFactory gf(Code)



lakeBounds
protected Envelope lakeBounds(Code)



lakeFeatures
protected Feature[] lakeFeatures(Code)



lakeType
protected FeatureType lakeType(Code)



newRiver
protected Feature newRiver(Code)



newRoad
protected Feature newRoad(Code)



rd12Bounds
protected Envelope rd12Bounds(Code)



rd12Filter
protected Filter rd12Filter(Code)



rd1Filter
protected Filter rd1Filter(Code)



rd2Filter
protected Filter rd2Filter(Code)



riverBounds
protected Envelope riverBounds(Code)



riverFeatures
protected Feature[] riverFeatures(Code)



riverType
protected FeatureType riverType(Code)



roadBounds
protected Envelope roadBounds(Code)



roadFeatures
protected SimpleFeature[] roadFeatures(Code)



roadType
protected FeatureType roadType(Code)



rv1Filter
protected Filter rv1Filter(Code)



subRiverType
protected FeatureType subRiverType(Code)



subRoadType
protected FeatureType subRoadType(Code)




Constructor Detail
DataTestCase
public DataTestCase(String name)(Code)
Creates a default test case with the given name.




Method Detail
assertEquals
protected void assertEquals(Geometry expected, Geometry actual)(Code)
Compares two geometries for equality.



assertEquals
protected void assertEquals(String message, Geometry expected, Geometry actual)(Code)
Compares two geometries for equality.



count
protected int count(FeatureReader reader) throws IOException(Code)
Counts the number of Features returned by the specified reader.

This method will close the reader.




count
protected int count(FeatureWriter writer) throws NoSuchElementException, IOException, IllegalAttributeException(Code)
Counts the number of Features in the specified writer. This method will close the writer.



dataSetUp
protected void dataSetUp() throws Exception(Code)
Loads the data.
See Also:   DataTestCase.setUp()



line
public LineString line(int[] xy)(Code)
Creates a line from the specified (x,y) coordinates. The coordinates are stored in a flat array.



lines
public MultiLineString lines(int[][] xy)(Code)
Creates a multiline from the specified (x,y) coordinates.



polygon
public Polygon polygon(int[] xy)(Code)
Creates a polygon from the specified (x,y) coordinates. The coordinates are stored in a flat array.



polygon
public Polygon polygon(int[] xy, int[][] holes)(Code)
Creates a line from the specified (x,y) coordinates and an arbitrary amount of holes.



ring
public LinearRing ring(int[] xy)(Code)
Creates a ring from the specified (x,y) coordinates. The coordinates are stored in a flat array.



setUp
protected void setUp() throws Exception(Code)
Invoked before a test is run. The default implementation invokes DataTestCase.dataSetUp .



tearDown
protected void tearDown() throws Exception(Code)
Set all data references to null , allowing garbage collection. This method is automatically invoked after each test.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.