summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2011-02-25 15:29:03 +0000
committerArtur Signell <artur.signell@itmill.com>2011-02-25 15:29:03 +0000
commitcde98fde1350ec68fa7a9d607a1d4f38d662bdf0 (patch)
tree34d0a528ff1eee8dc552a77379c28a5b1fc05db5 /tests
parent06d7521ccf666787f5b35ce2dbd070bffad66a86 (diff)
downloadvaadin-framework-cde98fde1350ec68fa7a9d607a1d4f38d662bdf0.tar.gz
vaadin-framework-cde98fde1350ec68fa7a9d607a1d4f38d662bdf0.zip
Test should now pass in all environments (locale problems fixed)
svn changeset:17478/svn branch:6.5
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/src/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java b/tests/src/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java
index 736fdc87a6..aca1c84ca3 100644
--- a/tests/src/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java
+++ b/tests/src/com/vaadin/tests/components/datefield/DateFieldEmptyValid.java
@@ -1,6 +1,7 @@
package com.vaadin.tests.components.datefield;
-import java.sql.Date;
+import java.text.DateFormat;
+import java.util.Date;
import java.util.Locale;
import com.vaadin.data.Property.ValueChangeEvent;
@@ -22,6 +23,9 @@ public class DateFieldEmptyValid extends TestBase {
private MyDateField df;
+ private DateFormat formatter = DateFormat.getDateTimeInstance(
+ DateFormat.LONG, DateFormat.LONG, new Locale("en", "US"));
+
public class MyDateField extends PopupDateField {
@Override
public boolean isEmpty() {
@@ -115,7 +119,13 @@ public class DateFieldEmptyValid extends TestBase {
}
private void checkEmpty() {
- log.log("DateField value is now " + df.getValue());
+ Object value = df.getValue();
+ if (value instanceof Date) {
+ value = formatter.format(df.getValue());
+ }
+
+ log.log("DateField value is now " + value);
+ // log.log("DateField value is now " + df.getValue());
log.log("isEmpty: " + df.isEmpty() + ", isValid: " + df.isValid());
}