webwork/src/test/webwork/util BeanUtilTestCase.java,1.1,1.2

[email protected] Wed, 12 Nov 2003 18:04:19 -0800
Newsgroups gmane.comp.java.open-symphony.cvs
Message-ID <[email protected]>
Update of /cvsroot/opensymphony/webwork/src/test/webwork/util
In directory sc8-pr-cvs1:/tmp/cvs-serv30866/src/test/webwork/util

Modified Files:
	BeanUtilTestCase.java 
Log Message:
Add support for Timestamp editor, along with a testcase for it. Fix WW-92


Index: BeanUtilTestCase.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/test/webwork/util/BeanUtilTestCase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- BeanUtilTestCase.java	2 Nov 2003 01:17:38 -0000	1.1
+++ BeanUtilTestCase.java	13 Nov 2003 02:04:17 -0000	1.2
@@ -3,6 +3,7 @@
 import java.util.*;
 import java.text.SimpleDateFormat;
 import java.text.DateFormat;
+import java.sql.Timestamp;
 
 import webwork.TestCaseSupport;
 
@@ -42,6 +43,9 @@
     BeanUtil.setProperty("date", formatter.format(cal.getTime()), bean);
     assertEquals("setting date property failed", cal.getTime(), bean.getDate());
 
+    BeanUtil.setProperty("timestamp", formatter.format(cal.getTime()), bean);
+    assertEquals("setting timestamp property failed", cal.getTime(), bean.getTimestamp());
+
     BeanUtil.setProperty("bool", "true", bean);
     assertTrue("setting boolean property failed", bean.isBool());
 
@@ -73,6 +77,7 @@
     private TestBean testBean;
     private Object myReadOnlyBean;
     private List list = new ArrayList();
+    private Timestamp timestamp;
 
     public Object getMyReadOnlyBean()
     {
@@ -98,6 +103,16 @@
     public void setDateFormat(DateFormat dateFormat)
     {
       this.dateFormat = dateFormat;
+    }
+
+    public Timestamp getTimestamp()
+    {
+      return timestamp;
+    }
+
+    public void setTimestamp(Timestamp timestamp)
+    {
+      this.timestamp = timestamp;
     }
 
     public List getList()




-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/