@@ -0,0 +1,2090 @@
+/*%0A * Tapestry Web Application Framework%0A * Copyright (c) 2002 by Howard Lewis Ship %0A *%0A * mailto:hship@users.sf.net%0A * %0A * This library is free software.%0A * %0A * You may redistribute it and/or modify it under the terms of the GNU%0A * Lesser General Public License as published by the Free Software Foundation.%0A *%0A * Version 2.1 of the license should be included with this distribution in%0A * the file LICENSE, as well as License.html. If the license is not%0A * included with this distribution, you may find a copy at the FSF web%0A * site at 'www.gnu.org' or 'www.fsf.org', or you may write to the%0A * Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139 USA.%0A *%0A * This library is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0A * Lesser General Public License for more details.%0A *%0A */%0Apackage net.sf.tapestry.junit.utils;%0A%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.ObjectInputStream;%0Aimport java.io.ObjectOutputStream;%0A%0Aimport com.primix.tapestry.spec.AssetType;%0Aimport com.primix.tapestry.util.Enum;%0A%0Aimport junit.framework.TestCase;%0A%0A/**%0A *  Tests the ability of an %7B@link Enum%7D to be serialized and deserialized properly.%0A * %0A *  @author Howard Lewis Ship%0A *  @version $Id$%0A * %0A **/%0A%0Apublic class TestEnum extends TestCase%0A%7B%0A%0A%09public TestEnum(String name)%0A%09%7B%0A%09%09super(name);%0A%09%7D%0A%0A    public void testSerialization()%0A    throws Exception%0A    %7B%0A        AssetType start = AssetType.EXTERNAL;%0A        %0A        ByteArrayOutputStream bos = new ByteArrayOutputStream();%0A        ObjectOutputStream oos = new ObjectOutputStream(bos);%0A        %0A        oos.writeObject(start);%0A        %0A        oos.close();%0A        %0A        ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());%0A        ObjectInputStream ois = new ObjectInputStream(bis);%0A        %0A        AssetType result = (AssetType)ois.readObject();%0A        %0A        assertEquals(start, result);%0A        assertSame(start, result);   %0A    %7D%0A%7D%0A

Add new test for testing Enum serialization / deserialization