Java Doc for DateConverterTestBase.java in  » Library » Apache-commons-beanutils-1.8.0-BETA-src » org » apache » commons » beanutils » converters » 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 » Library » Apache commons beanutils 1.8.0 BETA src » org.apache.commons.beanutils.converters 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.commons.beanutils.converters.DateConverterTestBase

All known Subclasses:   org.apache.commons.beanutils.converters.SqlDateConverterTestCase,  org.apache.commons.beanutils.converters.DateConverterTestCase,  org.apache.commons.beanutils.converters.SqlTimestampConverterTestCase,  org.apache.commons.beanutils.converters.CalendarConverterTestCase,  org.apache.commons.beanutils.converters.SqlTimeConverterTestCase,
DateConverterTestBase
abstract public class DateConverterTestBase extends TestCase (Code)
Abstract base for <Date>Converter classes.
version:
   $Revision: 471689 $ $Date: 2006-11-06 10:52:49 +0000 (Mon, 06 Nov 2006) $



Constructor Summary
public  DateConverterTestBase(String name)
     Construtc a new test case.

Method Summary
abstract protected  ClassgetExpectedType()
    
 longgetTimeInMillis(Object date)
    
 voidinvalidConversion(Converter converter, Object value)
    
abstract protected  DateTimeConvertermakeConverter()
     Create the Converter with no default value.
abstract protected  DateTimeConvertermakeConverter(Object defaultValue)
     Create the Converter with a default value.
 voidstringConversion(Converter converter, String expected, Object value)
    
public  voidtestConvertDate()
     Assumes convert() returns some non-null instance of getExpectedType().
public  voidtestConvertNull()
     Assumes ConversionException in response to covert(getExpectedType(), null).
public  voidtestDefaultStringToTypeConvert()
     Test default String to type conversion N.B.
public  voidtestDefaultType()
     Test Default Type conversion (i.e.
public  voidtestInvalidType()
    
public  voidtestLocale()
    
public  voidtestMultiplePatterns()
    
public  voidtestPatternDefault()
    
public  voidtestPatternNoDefault()
    
public  voidtestPatternNullDefault()
    
public  voidtestStringConversion()
    
 CalendartoCalendar(String value, String pattern, Locale locale)
    
 DatetoDate(Calendar calendar)
    
 java.sql.DatetoSqlDate(Calendar calendar)
    
 java.sql.TimetoSqlTime(Calendar calendar)
    
 java.sql.TimestamptoSqlTimestamp(Calendar calendar)
    
abstract protected  ObjecttoType(Calendar value)
    
 ObjecttoType(String value, String pattern, Locale locale)
    
 voidvalidConversion(Converter converter, Object expected, Object value)
    


Constructor Detail
DateConverterTestBase
public DateConverterTestBase(String name)(Code)
Construtc a new test case.
Parameters:
  name - Name of the test




Method Detail
getExpectedType
abstract protected Class getExpectedType()(Code)
Return the expected type The expected type



getTimeInMillis
long getTimeInMillis(Object date)(Code)
Convert a Date or Calendar objects to the time in millisconds
Parameters:
  date - The date or calendar object The time in milliseconds



invalidConversion
void invalidConversion(Converter converter, Object value)(Code)
Test Conversion Error
Parameters:
  converter - The converter to use
Parameters:
  value - The value to convert



makeConverter
abstract protected DateTimeConverter makeConverter()(Code)
Create the Converter with no default value. A new Converter



makeConverter
abstract protected DateTimeConverter makeConverter(Object defaultValue)(Code)
Create the Converter with a default value.
Parameters:
  defaultValue - The default value A new Converter



stringConversion
void stringConversion(Converter converter, String expected, Object value)(Code)
Test Conversion to String
Parameters:
  converter - The converter to use
Parameters:
  expected - The expected result
Parameters:
  value - The value to convert



testConvertDate
public void testConvertDate()(Code)
Assumes convert() returns some non-null instance of getExpectedType().



testConvertNull
public void testConvertNull()(Code)
Assumes ConversionException in response to covert(getExpectedType(), null).



testDefaultStringToTypeConvert
public void testDefaultStringToTypeConvert()(Code)
Test default String to type conversion N.B. This method is overriden by test case implementations for java.sql.Date/Time/Timestamp



testDefaultType
public void testDefaultType()(Code)
Test Default Type conversion (i.e. don't specify target type)



testInvalidType
public void testInvalidType()(Code)
Test Converter with types it can't handle



testLocale
public void testLocale()(Code)
Test Date Converter with no default value



testMultiplePatterns
public void testMultiplePatterns()(Code)
Test Converter with multiple patterns



testPatternDefault
public void testPatternDefault()(Code)
Test Converter with no default value



testPatternNoDefault
public void testPatternNoDefault()(Code)
Test Converter with no default value



testPatternNullDefault
public void testPatternNullDefault()(Code)
Test Converter with no default value



testStringConversion
public void testStringConversion()(Code)
Test Conversion to String



toCalendar
Calendar toCalendar(String value, String pattern, Locale locale)(Code)
Parse a String value to a Calendar
Parameters:
  value - The String value to parse
Parameters:
  pattern - The date pattern
Parameters:
  locale - The locale to use (or null) parsed Calendar value



toDate
Date toDate(Calendar calendar)(Code)
Convert a Calendar to a java.util.Date
Parameters:
  calendar - The calendar object to convert The converted java.util.Date



toSqlDate
java.sql.Date toSqlDate(Calendar calendar)(Code)
Convert a Calendar to a java.sql.Date
Parameters:
  calendar - The calendar object to convert The converted java.sql.Date



toSqlTime
java.sql.Time toSqlTime(Calendar calendar)(Code)
Convert a Calendar to a java.sql.Time
Parameters:
  calendar - The calendar object to convert The converted java.sql.Time



toSqlTimestamp
java.sql.Timestamp toSqlTimestamp(Calendar calendar)(Code)
Convert a Calendar to a java.sql.Timestamp
Parameters:
  calendar - The calendar object to convert The converted java.sql.Timestamp



toType
abstract protected Object toType(Calendar value)(Code)
Convert from a Calendar to the appropriate Date type
Parameters:
  value - The Calendar value to convert The converted value



toType
Object toType(String value, String pattern, Locale locale)(Code)
Parse a String value to the required type
Parameters:
  value - The String value to parse
Parameters:
  pattern - The date pattern
Parameters:
  locale - The locale to use (or null) parsed Calendar value



validConversion
void validConversion(Converter converter, Object expected, Object value)(Code)
Test Conversion to the required type
Parameters:
  converter - The converter to use
Parameters:
  expected - The expected result
Parameters:
  value - The value to convert



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