axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-axis/java/test/encoding TestDeser.java TestDeser2001.java
Date Sun, 20 May 2001 22:14:07 GMT
rubys       01/05/20 15:14:07

  Modified:    java/src/org/apache/axis/encoding DateSerializer.java
               java/test/encoding TestDeser.java TestDeser2001.java
  Log:
  Correctly handle times past noon.
  
  Revision  Changes    Path
  1.3       +1 -1      xml-axis/java/src/org/apache/axis/encoding/DateSerializer.java
  
  Index: DateSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/DateSerializer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DateSerializer.java	2001/05/09 21:29:40	1.2
  +++ DateSerializer.java	2001/05/20 22:14:05	1.3
  @@ -74,7 +74,7 @@
   public class DateSerializer implements Serializer {
   
       private static SimpleDateFormat zulu = 
  -      new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss.SSS'Z'");
  +      new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
   
       static {
         zulu.setTimeZone(TimeZone.getTimeZone("GMT"));
  
  
  
  1.6       +1 -1      xml-axis/java/test/encoding/TestDeser.java
  
  Index: TestDeser.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestDeser.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestDeser.java	2001/05/10 16:25:23	1.5
  +++ TestDeser.java	2001/05/20 22:14:06	1.6
  @@ -63,7 +63,7 @@
       /**
        * Verify that a given XML deserialized produces the expected result
        */
  -    private void deserialize(String data, Object expected) {
  +    protected void deserialize(String data, Object expected) {
          Message message = new Message(header + data + footer, "String");
          message.setMessageContext(new MessageContext());
   
  
  
  
  1.2       +17 -0     xml-axis/java/test/encoding/TestDeser2001.java
  
  Index: TestDeser2001.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestDeser2001.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestDeser2001.java	2001/05/04 06:09:54	1.1
  +++ TestDeser2001.java	2001/05/20 22:14:06	1.2
  @@ -2,6 +2,8 @@
   
   import org.apache.axis.Constants;
   import junit.framework.TestCase;
  +import java.util.Calendar;
  +import java.util.TimeZone;
   
   /** 
    * Test deserialization of SOAP responses
  @@ -12,4 +14,19 @@
           super(name, Constants.URI_2001_SCHEMA_XSI, 
                       Constants.URI_2001_SCHEMA_XSD);
       }
  +
  +    /** 
  +     * Test deserialization of Date responses
  +     */
  +    public void testDate() {
  +        Calendar date = Calendar.getInstance();
  +        date.set(1999,04,31,12,01,30);
  +        date.setTimeZone(TimeZone.getTimeZone("GMT"));
  +        date.set(Calendar.MILLISECOND,150);
  +        deserialize("<result xsi:type=\"xsd:dateTime\">" + 
  +                       "1999-05-31T12:01:30.150Z" + 
  +                     "</result>",
  +                     date.getTime());
  +    }
  +
   }
  
  
  

Mime
View raw message