Java Doc for TestCase.java in  » Internationalization-Localization » icu4j » com » ibm » icu » dev » test » calendar » 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 » Internationalization Localization » icu4j » com.ibm.icu.dev.test.calendar 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ibm.icu.dev.test.calendar.TestCase

All known Subclasses:   com.ibm.icu.dev.test.calendar.ChineseTestCase,
TestCase
public class TestCase (Code)
A pseudo Calendar that is useful for testing new calendars. A TestCase object is used to hold the field and millisecond values that the calendar should have at one particular instant in time. The applyFields and applyTime methods are used to apply these settings to the calendar object being tested, and the equals and fieldsEqual methods are used to ensure that the calendar has ended up in the right state.


Field Summary
final protected static  longJULIAN_EPOCH
    
final protected static  longONE_DAY
    
final protected static  intONE_HOUR
    
final protected static  intONE_MINUTE
    
final protected static  intONE_SECOND
    
final public static  SimpleTimeZoneUTC
    
protected  int[]fields
    
protected  boolean[]isSet
    
protected  longtime
    

Constructor Summary
public  TestCase(double julian, int era, int year, int month, int day, int dayOfWeek, int hour, int min, int sec)
     Initialize a TestCase object using a julian day number and the corresponding fields for the calendar being tested.
public  TestCase(int gregYear, int gregMonth, int gregDay, int era, int year, int month, int day, int dayOfWeek, int hour, int min, int sec)
     Initialize a TestCase object using a Gregorian year/month/day and the corresponding fields for the calendar being tested.
protected  TestCase()
     For subclasses.

Method Summary
public  voidapplyFields(Calendar c)
     Apply this test case's field values to another calendar by calling its set method for each field.
public  voidapplyTime(Calendar c)
     Apply this test case's time in milliseconds to another calendar by calling its setTime method.
public static  StringdowToString(int dow)
    
public  booleanequals(Object obj)
     Determine whether time in milliseconds of this calendar is the same as that of the other calendar.
public  booleanfieldsEqual(Calendar c, TestLog log)
     Determine whether the fields of this calendar are the same as that of the other calendar.
protected  intget(int field)
    
public  DategetTime()
    
protected  booleanisSet(int field)
    
protected  voidset(int field, int value)
    
protected  voidsetTime(Date d)
    
public  StringtoString()
     Return a String representation of this test case's time.

Field Detail
JULIAN_EPOCH
final protected static long JULIAN_EPOCH(Code)



ONE_DAY
final protected static long ONE_DAY(Code)



ONE_HOUR
final protected static int ONE_HOUR(Code)



ONE_MINUTE
final protected static int ONE_MINUTE(Code)



ONE_SECOND
final protected static int ONE_SECOND(Code)



UTC
final public static SimpleTimeZone UTC(Code)



fields
protected int[] fields(Code)



isSet
protected boolean[] isSet(Code)



time
protected long time(Code)




Constructor Detail
TestCase
public TestCase(double julian, int era, int year, int month, int day, int dayOfWeek, int hour, int min, int sec)(Code)
Initialize a TestCase object using a julian day number and the corresponding fields for the calendar being tested.
Parameters:
  era - The ERA field of tested calendar on the given julian day
Parameters:
  year - The YEAR field of tested calendar on the given julian day
Parameters:
  month - The MONTH (1-based) field of tested calendar on the given julian day
Parameters:
  day - The DAY_OF_MONTH field of tested calendar on the given julian day
Parameters:
  dayOfWeek - The DAY_OF_WEEK field of tested calendar on the given julian day
Parameters:
  hour - The HOUR field of tested calendar on the given julian day
Parameters:
  min - The MINUTE field of tested calendar on the given julian day
Parameters:
  sec - The SECOND field of tested calendar on the given julian day



TestCase
public TestCase(int gregYear, int gregMonth, int gregDay, int era, int year, int month, int day, int dayOfWeek, int hour, int min, int sec)(Code)
Initialize a TestCase object using a Gregorian year/month/day and the corresponding fields for the calendar being tested.
Parameters:
  gregYear - The Gregorian year of the date to be tested
Parameters:
  gregMonth - The Gregorian month of the date to be tested
Parameters:
  gregDay - The Gregorian day of the month of the date to be tested
Parameters:
  era - The ERA field of tested calendar on the given gregorian date
Parameters:
  year - The YEAR field of tested calendar on the given gregorian date
Parameters:
  month - The MONTH (0-based) field of tested calendar on the given gregorian date
Parameters:
  day - The DAY_OF_MONTH field of tested calendar on the given gregorian date
Parameters:
  dayOfWeek - The DAY_OF_WEEK field of tested calendar on the given gregorian date
Parameters:
  hour - The HOUR field of tested calendar on the given gregorian date
Parameters:
  min - The MINUTE field of tested calendar on the given gregorian date
Parameters:
  sec - The SECOND field of tested calendar on the given gregorian date



TestCase
protected TestCase()(Code)
For subclasses.




Method Detail
applyFields
public void applyFields(Calendar c)(Code)
Apply this test case's field values to another calendar by calling its set method for each field. This is useful in combination with the equal method.
See Also:   com.ibm.icu.util.Calendar.equals



applyTime
public void applyTime(Calendar c)(Code)
Apply this test case's time in milliseconds to another calendar by calling its setTime method. This is useful in combination with fieldsEqual
See Also:   TestCase.fieldsEqual



dowToString
public static String dowToString(int dow)(Code)



equals
public boolean equals(Object obj)(Code)
Determine whether time in milliseconds of this calendar is the same as that of the other calendar. This method is useful for determining whether the other calendar's computeTime method works properly. For example:
 Calendar testCalendar = ...
 TestCase case = ...
 case.applyFields(testCalendar);
 if (!case.equals(testCalendar)) {
 // Error!
 }
 

See Also:   TestCase.applyFields



fieldsEqual
public boolean fieldsEqual(Calendar c, TestLog log)(Code)
Determine whether the fields of this calendar are the same as that of the other calendar. This method is useful for determining whether the other calendar's computeFields method works properly. For example:
 Calendar testCalendar = ...
 TestCase case = ...
 case.applyTime(testCalendar);
 if (!case.fieldsEqual(testCalendar)) {
 // Error!
 }
 

See Also:   TestCase.applyTime



get
protected int get(int field)(Code)



getTime
public Date getTime()(Code)



isSet
protected boolean isSet(int field)(Code)



set
protected void set(int field, int value)(Code)



setTime
protected void setTime(Date d)(Code)



toString
public String toString()(Code)
Return a String representation of this test case's time.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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