Java Doc for TestUnsupportedDateTimeField.java in  » Development » Joda-Time » org » joda » time » field » 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 » Development » Joda Time » org.joda.time.field 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.joda.time.field.TestUnsupportedDateTimeField

TestUnsupportedDateTimeField
public class TestUnsupportedDateTimeField extends TestCase (Code)
This class is a JUnit test to test only the UnsupportedDateTimeField class. This set of test cases exercises everything described in the Javadoc for this class.
author:
   Jeremy R. Rickard




Method Summary
protected  voidsetUp()
    
public static  TestSuitesuite()
    
public  voidtestAlwaysFalseReturnTypes()
     As this is an unsupported date/time field, some normal methods will always return false, as they are not supported.
public  voidtestDelegatedMethods()
     As this is an unsupported date/time field, many normal methods are unsupported.
public  voidtestDifferentDurationReturnDifferentObjects()
     This test exercises the logic in UnsupportedDateTimeField.getInstance.
public  voidtestMethodsThatShouldAlwaysReturnNull()
     According to the JavaDocs, there are two methods that should always return null.
public  voidtestNullValuesToGetInstanceThrowsException()
    
public  voidtestPublicGetNameMethod()
     The getName() method should return the same value as the getName() method of the DateTimeFieldType that was used to create the instance.
public  voidtestToString()
     The toString method should return a suitable debug message (not null).
public  voidtestUnsupportedMethods()
     As this is an unsupported date/time field, many normal methods are unsupported and throw an UnsupportedOperationException.



Method Detail
setUp
protected void setUp() throws Exception(Code)



suite
public static TestSuite suite()(Code)



testAlwaysFalseReturnTypes
public void testAlwaysFalseReturnTypes()(Code)
As this is an unsupported date/time field, some normal methods will always return false, as they are not supported. Verify that each method correctly returns null.



testDelegatedMethods
public void testDelegatedMethods()(Code)
As this is an unsupported date/time field, many normal methods are unsupported. Some delegate and can possibly throw an UnsupportedOperationException or have a valid return. Verify that each method correctly throws this exception when appropriate and delegates correctly based on the Duration used to get the instance.



testDifferentDurationReturnDifferentObjects
public void testDifferentDurationReturnDifferentObjects()(Code)
This test exercises the logic in UnsupportedDateTimeField.getInstance. If getInstance() is invoked twice with: - the same DateTimeFieldType - different duration fields Then the field returned in the first invocation should not be equal to the field returned by the second invocation. In otherwords, the generated instance should be the same for a unique pairing of DateTimeFieldType/DurationField



testMethodsThatShouldAlwaysReturnNull
public void testMethodsThatShouldAlwaysReturnNull()(Code)
According to the JavaDocs, there are two methods that should always return null. * getRangeDurationField() * getLeapDurationField() Ensure that these are in fact null.



testNullValuesToGetInstanceThrowsException
public void testNullValuesToGetInstanceThrowsException()(Code)
Passing null values into UnsupportedDateTimeField.getInstance() should throw an IllegalArguementsException



testPublicGetNameMethod
public void testPublicGetNameMethod()(Code)
The getName() method should return the same value as the getName() method of the DateTimeFieldType that was used to create the instance.



testToString
public void testToString()(Code)
The toString method should return a suitable debug message (not null). Ensure that the toString method returns a string with length greater than 0 (and not null)



testUnsupportedMethods
public void testUnsupportedMethods()(Code)
As this is an unsupported date/time field, many normal methods are unsupported and throw an UnsupportedOperationException. Verify that each method correctly throws this exception. * add(ReadablePartial instant, int fieldIndex, int[] values, int valueToAdd) * addWrapField(long instant, int value) * addWrapField(ReadablePartial instant, int fieldIndex, int[] values, int valueToAdd) * addWrapPartial(ReadablePartial instant, int fieldIndex, int[] values, int valueToAdd) * get(long instant) * getAsShortText(int fieldValue, Locale locale) * getAsShortText(long instant) * getAsShortText(long instant, Locale locale) * getAsShortText(ReadablePartial partial, int fieldValue, Locale locale) * getAsShortText(ReadablePartial partial, Locale locale) * getAsText(int fieldValue, Locale locale) * getAsText(long instant) * getAsText(long instant, Locale locale) * getAsText(ReadablePartial partial, int fieldValue, Locale locale) * getAsText(ReadablePartial partial, Locale locale) * getLeapAmount(long instant) * getMaximumShortTextLength(Locale locale) * getMaximumTextLength(Locale locale) * getMaximumValue() * getMaximumValue(long instant) * getMaximumValue(ReadablePartial instant) * getMaximumValue(ReadablePartial instant, int[] values) * getMinimumValue() * getMinimumValue(long instant) * getMinimumValue(ReadablePartial instant) * getMinimumValue(ReadablePartial instant, int[] values) * isLeap(long instant) * remainder(long instant) * roundCeiling(long instant) * roundFloor(long instant) * roundHalfCeiling(long instant) * roundHalfEven(long instant) * roundHalfFloor(long instant) * set(long instant, int value) * set(long instant, String text) * set(long instant, String text, Locale locale) * set(ReadablePartial instant, int fieldIndex, int[] values, int newValue) * set(ReadablePartial instant, int fieldIndex, int[] values, String text, Locale locale)



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