User: jung    
  Date: 01/01/03 02:24:01

  Modified:    src/org/zoap/xml/test Xml.java
  Log:
  exception redesign. Improved null-pointer treatment. coherent environment and 
logging facilities.
  
  Revision  Changes    Path
  1.3       +23 -56    zoap/src/org/zoap/xml/test/Xml.java
  
  Index: Xml.java
  ===================================================================
  RCS file: /products/cvs/ejboss/zoap/src/org/zoap/xml/test/Xml.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Xml.java  2000/12/04 12:36:45     1.2
  +++ Xml.java  2001/01/03 10:24:01     1.3
  @@ -1,45 +1,22 @@
  -/*
  - *   $Id: Xml.java,v 1.2 2000/12/04 12:36:45 jung Exp $
  - *   Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
  - *   D-66299 Friedrichsthal, Germany. All Rights Reserved.
  +/*   
  + * $Source: /products/cvs/ejboss/zoap/src/org/zoap/xml/test/Xml.java,v $ 
  + * The Zero-effort Object Access Package is a library to support XML/SOAP 
serialisation and invocation.
  + * Copyright (c) 2000 infor business solutions AG, Hauerstrasse 12, 
  + * D-66299 Friedrichsthal, Germany. All Rights Reserved. 
    *
  - *   License Statement
  + * This library is free software; you can redistribute it and/or
  + * modify it under the terms of the GNU Lesser General Public
  + * License as published by the Free Software Foundation; either
  + * version 2.1 of the License, or (at your option) any later version.
    *
  - *   Redistribution and use of this software and associated documentation 
("Software"), with or without
  - *   modification, are permitted provided that the following conditions are met:
  + * This library is distributed in the hope that it will be useful,
  + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  + * Lesser General Public License for more details.
    *
  - *   1.      Redistributions of source code must retain copyright statements and 
notices.
  - *           Redistributions must also contain a copy of this document.
  - *
  - *   2.      Redistributions in binary form must reproduce the attached copyright 
notice, this list of
  - *           conditions and the following disclaimer in the documentation and/or 
other materials provided
  - *           with the distribution.
  - *
  - *   3.      The end-user documentation included with the redistribution, if any, 
must include the following
  - *           acknowledgment: "This product includes software developed by infor: 
business solutions AG
  - *           (http://www.infor.de/)." Alternately, this acknowledgment may appear 
in the software itself,
  - *           if and wherever such third-party acknowledgments normally appear.
  - *
  - *   4.      The name "infor" must not be used to endorse or promote products 
derived from this
  - *           Software without prior written permission of infor: business solutions 
AG.
  - *           For written permission, please contact [EMAIL PROTECTED]
  - *
  - *   5.      Products derived from this Software may not be called "infor" nor may 
"infor" appear
  - *           in their names without prior written permission of infor: business 
solutions AG. infor
  - *           is a registered trademark of infor:business solutions AG.
  - *
  - *   Disclaimer
  - *
  - *   THIS SOFTWARE IS PROVIDED BY INFOR: BUSINESS SOLUTIONS AG AND CONTRIBUTORS "AS 
IS" AND ANY
  - *   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF
  - *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  - *
  - *   IN NO EVENT SHALL INFOR: BUSINESS SOLUTIONS AG OR ITS CONTRIBUTORS BE LIABLE 
FOR ANY DIRECT,
  - *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO,
  - *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
BUSINESS INTERRUPTION)
  - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
LIABILITY, OR TORT
  - *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE,
  - *   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  + * You should have received a copy of the GNU Lesser General Public
  + * License along with this library; if not, write to the Free Software
  + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
   
   package org.zoap.xml.test;
  @@ -96,7 +73,7 @@
    *      A unit test for checking low-level features of the XML service
    *      @see <related>
    *      @author $Author: jung $
  - *      @version $Revision: 1.2 $
  + *      @version $Revision: 1.3 $
    */
   
   public class Xml extends junit.framework.TestCase {
  @@ -156,11 +133,9 @@
                java.io.StringReader stringStream =
                new java.io.StringReader(stringWriter.toString());
   
  -             System.out.println(stringWriter.toString());
  -
                XmlObjectReader xmlObjectReader = new XmlObjectReader(stringStream, 
new DefaultBinding());
   
  -        Date result=(Date)      xmlObjectReader.readObject();
  +        Date result=(Date) xmlObjectReader.readObject();
   
                assert("Testing writing and reading of date", result.getTime()==42);
        }
  @@ -236,6 +211,7 @@
                XmlObjectWriter xmlObjectWriter = new XmlObjectWriter(stringWriter, 
new DefaultBinding());
   
                TestObject2 testObject = new TestObject2();
  +
                TestObject3 testObject2 = new TestObject3();
   
                testObject.setTestInherited(true);
  @@ -266,7 +242,6 @@
   
                testObject.setTestDouble((double)42.0);
   
  -
                testObject.setTestDate(new Date((long)42));
   
                testObject.setTestString("42���</>\'&\"");
  @@ -382,6 +357,10 @@
   
                TestObject2 testObject = new TestObject2();
   
  +        testObject.setTestString("");
  +
  +        testObject.setTestDecimal(new java.math.BigDecimal(0));
  +
                xmlObjectWriter.writeObject(new TestObject[] { testObject, testObject 
});
   
                // maybe we could add some literal comparison of the stream
  @@ -1048,25 +1027,4 @@
   
   } // Xml
   
  -/**
  - * $Log: Xml.java,v $
  - * Revision 1.2  2000/12/04 12:36:45  jung
  - * adopted to latest jboss container,
  - *
  - * added decimal and date
  - *
  - * removed some problems due to forward-referencing in meta-data
  - *
  - * added serialisation policy
  - *
  - * Revision 1.2  2000/11/22 14:23:38  jung
  - * added date to test
  - *
  - * Revision 1.1.1.1  2000/11/16 14:50:02  jung
  - * added the up-to-date ZOAP source (how I know: I 
  - * made it).
  - *
  - * Revision 1.1.1.1  2000/08/10 21:08:16  jung
  - * Initial import.
  - *
  - */
  +
  
  
  

Reply via email to