harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r427476 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test: api/java/org/apache/harmony/luni/tests/java/lang/ resources/serialization/java/lang/ resources/serialization/org/ resources/serialization/org/apache/ resources/s...
Date Tue, 01 Aug 2006 07:32:41 GMT
Author: smishura
Date: Tue Aug  1 00:32:40 2006
New Revision: 427476

URL: http://svn.apache.org/viewvc?rev=427476&view=rev
Log:
Refactoring IllegalArgumentException serialization tests

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/apache/
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/apache/harmony/
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/apache/harmony/luni/
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/apache/harmony/luni/tests/
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/apache/harmony/luni/tests/java/
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/apache/harmony/luni/tests/java/lang/
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/apache/harmony/luni/tests/java/lang/IllegalArgumentExceptionTest.golden.ser
      - copied unchanged from r427410, incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/IllegalArgumentException.ser
Removed:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/java/lang/IllegalArgumentException.ser
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/java/org/apache/harmony/luni/tests/java/lang/IllegalArgumentExceptionTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/java/org/apache/harmony/luni/tests/java/lang/IllegalArgumentExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/java/org/apache/harmony/luni/tests/java/lang/IllegalArgumentExceptionTest.java?rev=427476&r1=427475&r2=427476&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/java/org/apache/harmony/luni/tests/java/lang/IllegalArgumentExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/java/org/apache/harmony/luni/tests/java/lang/IllegalArgumentExceptionTest.java
Tue Aug  1 00:32:40 2006
@@ -15,12 +15,10 @@
 
 package org.apache.harmony.luni.tests.java.lang;
 
-import tests.util.SerializationTester;
+import org.apache.harmony.testframework.serialization.SerializationTest;
 
 public class IllegalArgumentExceptionTest extends junit.framework.TestCase {
 
-	private static final String SERIALIZATION_FILE_NAME = "serialization/java/lang/IllegalArgumentException.ser";
//$NON-NLS-1$
-	
 	class TestThread implements Runnable {
 		public void run() {
 			try {
@@ -62,25 +60,20 @@
 				"testing illArg exception", ill.getMessage());
 	}
 
-	/**
-	 * @tests serialization/deserilazation.
-	 */
-	public void test_serialization() throws Exception {
-		IllegalArgumentException srcIllegalArgumentException = new IllegalArgumentException();
-		IllegalArgumentException destIllegalArgumentException = (IllegalArgumentException) SerializationTester
-				.getDeserilizedObject(srcIllegalArgumentException);
-	}
+    /**
+     * @tests serialization/deserialization.
+     */
+    public void testSerializationSelf() throws Exception {
+        SerializationTest.verifySelf(new IllegalArgumentException());
+    }
+
+    /**
+     * @tests serialization/deserialization compatibility with RI.
+     */
+    public void testSerializationCompatibility() throws Exception {
+        SerializationTest.verifyGolden(this, new IllegalArgumentException());
+    }
 
-	/**
-	 * @tests serialization/deserilazation compatibility with RI.
-	 */
-	public void test_serializationCompatibility() throws Exception {
-		IllegalArgumentException srcIllegalArgumentException = new IllegalArgumentException();
-		IllegalArgumentException destIllegalArgumentException = (IllegalArgumentException) SerializationTester
-				.readObject(srcIllegalArgumentException,
-						SERIALIZATION_FILE_NAME);
-	}
-	
 	/**
 	 * Sets up the fixture, for example, open a network connection. This method
 	 * is called before a test is executed.



Mime
View raw message