@@ -30,33 +30,27 @@ public class DateTimeStampTest extends AbstractTimeRelatedTestCase {
30
30
31
31
32
32
@ Test (expected = XPathException .class )
33
- public void crate1 () throws XPathException {
33
+ public void constructWithoutTimeZone () throws XPathException {
34
34
new DateTimeStampValue ("2005-10-11T10:00:00" );
35
35
}
36
36
37
37
@ Test
38
- public void convert1 () throws XPathException {
39
- DateTimeValue dateTimeValue = new DateTimeValue ("2005-10-11T10:00:00Z" );
40
- AtomicValue value = dateTimeValue .convertTo (Type .DATE_TIME_STAMP );
38
+ public void convertDateTimeWithTimeZoneToDateTimeStamp () throws XPathException {
39
+ final DateTimeValue dateTimeValue = new DateTimeValue ("2005-10-11T10:00:00Z" );
40
+ final AtomicValue value = dateTimeValue .convertTo (Type .DATE_TIME_STAMP );
41
41
assertEquals (DateTimeStampValue .class , value .getClass ());
42
42
}
43
43
44
44
@ Test (expected = XPathException .class )
45
- public void convert2 () throws XPathException {
46
- DateTimeValue dateTimeValue = new DateTimeValue ("2005-10-11T10:00:00" );
47
- AtomicValue value = dateTimeValue .convertTo (Type .DATE_TIME_STAMP );
45
+ public void convertDateTimeWithoutTimeZoneToDateTimeStamp () throws XPathException {
46
+ final DateTimeValue dateTimeValue = new DateTimeValue ("2005-10-11T10:00:00" );
47
+ final AtomicValue value = dateTimeValue .convertTo (Type .DATE_TIME_STAMP );
48
48
assertEquals (DateTimeStampValue .class , value .getClass ());
49
49
}
50
50
51
51
@ Test ()
52
- public void getTimezone1 () throws XPathException {
53
- DateTimeStampValue value = new DateTimeStampValue ("2005-10-11T10:00:00+10:00" );
52
+ public void getTimezone () throws XPathException {
53
+ final DateTimeStampValue value = new DateTimeStampValue ("2005-10-11T10:00:00+10:00" );
54
54
assertEquals (10 * 60 , value .calendar .getTimezone ());
55
55
}
56
-
57
-
58
-
59
-
60
-
61
-
62
56
}
0 commit comments