CVS: Tapestry/junit/src/net/sf/tapestry/junit/mock/c6 StringHolder.java,NONE,1.1.2.1 Four.java,1.1.2.2,1.1.2.3

Howard Lewis Ship <[email protected]>
Newsgroups gmane.comp.java.tapestry.cvs
Message-ID <[email protected]>
Update of /cvsroot/tapestry/Tapestry/junit/src/net/sf/tapestry/junit/mock/c6
In directory sc8-pr-cvs1:/tmp/cvs-serv15813/junit/src/net/sf/tapestry/junit/mock/c6

Modified Files:
      Tag: hship-2-3
	Four.java 
Added Files:
      Tag: hship-2-3
	StringHolder.java 
Log Message:
Add tests for Serializable proprerty persistance.

--- NEW FILE: StringHolder.java ---
package net.sf.tapestry.junit.mock.c6;

import java.io.Serializable;

public class StringHolder implements Serializable
{
    private String _string;

    public StringHolder()
    {
    }

    public StringHolder(String string)
    {
        setString(string);
    }

    public String getString()
    {
        return _string;
    }

    public void setString(String string)
    {
        _string = string;
    }

    public String toString()
    {
        return "StringHolder[" + _string + "]";
    }
}

Index: Four.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/junit/src/net/sf/tapestry/junit/mock/c6/Attic/Four.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** Four.java	31 Dec 2002 12:22:16 -0000	1.1.2.2
--- Four.java	2 Jan 2003 13:24:58 -0000	1.1.2.3
***************
*** 23,26 ****
--- 23,27 ----
      private char _charValue;
      private int _intValue;
+     private StringHolder _stringHolder;
      
      public void initialize()
***************
*** 34,37 ****
--- 35,39 ----
        _charValue = ' ';
        _intValue = 0;
+       _stringHolder = null;
      }   
      
***************
*** 118,121 ****
--- 120,124 ----
          setByteValue((byte)27);
          setIntValue(23);
+         setStringHolder(new StringHolder("Surprise!"));
      }
  
***************
*** 142,145 ****
--- 145,160 ----
          
          fireObservedChange("intValue", intValue);
+     }
+ 
+     public StringHolder getStringHolder()
+     {
+         return _stringHolder;
+     }
+ 
+     public void setStringHolder(StringHolder stringHolder)
+     {
+         _stringHolder = stringHolder;
+         
+         fireObservedChange("stringHolder", stringHolder);
      }
  



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.