Author: ltheussl
Date: Thu Jun 11 08:13:49 2009
New Revision: 783686
URL: http://svn.apache.org/viewvc?rev=783686&view=rev
Log:
Make the test pass in my timezone too... :)
Modified:
maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java
Modified:
maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java
URL:
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java?rev=783686&r1=783685&r2=783686&view=diff
==============================================================================
---
maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java
(original)
+++
maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/document/DocumentModelTest.java
Thu Jun 11 08:13:49 2009
@@ -43,6 +43,10 @@
public class DocumentModelTest
extends PlexusTestCase
{
+ /** ISO 8601 date format, i.e. <code>yyyy-MM-dd</code> **/
+ private static final java.text.DateFormat ISO_8601_FORMAT =
+ new java.text.SimpleDateFormat( "yyyy-MM-dd",
java.util.Locale.ENGLISH );
+
/**
* Test DocumentModel.
*
@@ -156,7 +160,8 @@
assertEquals( "companyLogo", cover.getCompanyLogo() );
assertEquals( "companyName", cover.getCompanyName() );
assertEquals( 0L, cover.getCoverDate().getTime() );
- assertEquals( "1969-12-31", cover.getCoverdate() );
+ // the actual String depends on the timezone you're in
+ assertEquals( ISO_8601_FORMAT.format( new Date( 0L ) ),
cover.getCoverdate() );
assertEquals( "coverSubTitle", cover.getCoverSubTitle() );
assertEquals( "coverTitle", cover.getCoverTitle() );
assertEquals( "coverType", cover.getCoverType() );