commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/scarab CreatedDate.java GlobalAttribute.java Module.java TestScarabSettings.java scarab-settings.xml
Date Wed, 12 Jun 2002 22:25:32 GMT
jon         2002/06/12 15:25:32

  Modified:    betwixt/src/test/org/apache/commons/betwixt/scarab
                        GlobalAttribute.java Module.java
                        TestScarabSettings.java scarab-settings.xml
  Added:       betwixt/src/test/org/apache/commons/betwixt/scarab
                        CreatedDate.java
  Log:
  added CreatedDate object
  
  added test for CreatedDate
  
  added some debugging.
  
  -jon
  
  Revision  Changes    Path
  1.2       +14 -4     jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/scarab/GlobalAttribute.java
  
  Index: GlobalAttribute.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/scarab/GlobalAttribute.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GlobalAttribute.java	10 Jun 2002 17:53:35 -0000	1.1
  +++ GlobalAttribute.java	12 Jun 2002 22:25:32 -0000	1.2
  @@ -76,7 +76,6 @@
    */
   public class GlobalAttribute implements Serializable
   {
  -
       /**
        * Logger
        */
  @@ -85,7 +84,8 @@
       private List globalAttributeOptions;
       
       private String name;
  -    
  +    private CreatedDate createdDate;
  +
       /**
        * Constructor for the ScarabSettings object
        */
  @@ -95,7 +95,7 @@
       }
   
       public String toString() {
  -        return super.toString() + "[name=" + name + ";options=" + globalAttributeOptions
+ "]";
  +        return super.toString() + "[name=" + name + ";createdDate=" + createdDate + ";options="
+ globalAttributeOptions + "]";
       }
   
       public void addGlobalAttributeOption(GlobalAttributeOption globalAttributeOption)
  @@ -116,5 +116,15 @@
       public String getName()
       {
           return name;
  -    }        
  +    }
  +    
  +    public void addCreatedDate(CreatedDate cd)
  +    {
  +        this.createdDate = cd;
  +    }
  +    
  +    public CreatedDate getCreatedDate()
  +    {
  +        return this.createdDate;
  +    }
   }
  
  
  
  1.2       +4 -1      jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/scarab/Module.java
  
  Index: Module.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/scarab/Module.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Module.java	10 Jun 2002 17:53:35 -0000	1.1
  +++ Module.java	12 Jun 2002 22:25:32 -0000	1.2
  @@ -75,8 +75,10 @@
    * @author <a href="mailto:jason@zenplex.com">Jason van Zyl</a>
    * @version $Id$
    */
  -public class Module implements Serializable
  +public class Module
   {
  +    private final static Log log = LogFactory.getLog(Module.class);
  +
       private String name;
       
       /**
  @@ -88,6 +90,7 @@
   
       public void setName(String name)
       {
  +        log.debug("Module.setName(): " + name);
           this.name = name;
       }        
   
  
  
  
  1.3       +2 -0      jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/scarab/TestScarabSettings.java
  
  Index: TestScarabSettings.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/scarab/TestScarabSettings.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestScarabSettings.java	11 Jun 2002 16:05:20 -0000	1.2
  +++ TestScarabSettings.java	12 Jun 2002 22:25:32 -0000	1.3
  @@ -194,6 +194,8 @@
           
           System.out.println( "GlobalAttribute: " + ga);
           System.out.println( "globalAttributeOptions: " + globalAttributeOptions);
  +
  +        assertEquals(ga.getCreatedDate().getTimestamp(), "2002-05-31 13:29:27.0");
           
           assertEquals(globalAttributeOptions.size(), 2);
           GlobalAttributeOption gao = (GlobalAttributeOption) globalAttributeOptions.get(0);
  
  
  
  1.2       +1 -1      jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/scarab/scarab-settings.xml
  
  Index: scarab-settings.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/scarab/scarab-settings.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- scarab-settings.xml	10 Jun 2002 17:53:35 -0000	1.1
  +++ scarab-settings.xml	12 Jun 2002 22:25:32 -0000	1.2
  @@ -70,5 +70,5 @@
         <code>PACS</code>
       </module>
     </modules>
  -  
  +
   </scarab-settings>
  
  
  
  1.1                  jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/scarab/CreatedDate.java
  
  Index: CreatedDate.java
  ===================================================================
  package org.apache.commons.betwixt.scarab;
  
  /*
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above 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 acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``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 THE APACHE SOFTWARE FOUNDATION 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  import java.io.Serializable;
  import java.util.ArrayList;
  import java.util.Enumeration;
  import java.util.Iterator;
  import java.util.List;
  import java.util.Map;
  
  import org.apache.commons.collections.IteratorEnumeration;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  
  /**
   * <p><code>CreatedDate</code> is a sample bean for use by the test cases.</p>
   *
   * @author <a href="mailto:jon@latchkey.com">Jon Scott Stevens</a>
   * @version $Id: CreatedDate.java,v 1.1 2002/06/12 22:25:32 jon Exp $
   */
  public class CreatedDate implements Serializable
  {
      /**
       * Logger
       */
      private final static Log log = LogFactory.getLog(CreatedDate.class);
  
      private String format;
      private String timestamp;
  
      public void setFormat(String format)
      {
          this.format = format;
      }
  
      public String getFormat()
      {
          return this.format;
      }
  
      public void setTimestamp(String timestamp)
      {
          this.timestamp = timestamp;
      }
  
      public String getTimestamp()
      {
          return this.timestamp;
      }
  
      public String toString()
      {
          return "format=" + format + ";timestamp=" + timestamp;
      }
  }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message