harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r443275 - in /incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test: java/common/org/apache/harmony/nio/tests/java/nio/ resources/serialization/java/nio/ resources/serialization/org/apache/harmony/nio/tests/java/nio/
Date Thu, 14 Sep 2006 07:25:20 GMT
Author: smishura
Date: Thu Sep 14 00:25:18 2006
New Revision: 443275

URL: http://svn.apache.org/viewvc?view=rev&rev=443275
Log:
Organize nio tests: refactoring java.nio serialization tests to use new testing framework

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/org/apache/harmony/nio/tests/java/nio/BufferOverflowExceptionTest.golden.ser
      - copied unchanged from r443253, incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/BufferOverflowException.golden.ser
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/org/apache/harmony/nio/tests/java/nio/BufferUnderflowExceptionTest.golden.ser
      - copied unchanged from r443253, incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/BufferUnderflowExceptionTest.golden.ser
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/org/apache/harmony/nio/tests/java/nio/InvalidMarkExceptionTest.golden.ser
      - copied unchanged from r443253, incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/InvalidMarkExceptionTest.golden.ser
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/org/apache/harmony/nio/tests/java/nio/ReadOnlyBufferExceptionTest.golden.ser
      - copied unchanged from r443253, incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/ReadOnlyBufferExceptionTest.golden.ser
Removed:
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/BufferOverflowException.golden.ser
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/BufferUnderflowExceptionTest.golden.ser
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/InvalidMarkExceptionTest.golden.ser
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/ReadOnlyBufferExceptionTest.golden.ser
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/BufferOverflowExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/BufferUnderflowExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/InvalidMarkExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ReadOnlyBufferExceptionTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/BufferOverflowExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/BufferOverflowExceptionTest.java?view=diff&rev=443275&r1=443274&r2=443275
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/BufferOverflowExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/BufferOverflowExceptionTest.java
Thu Sep 14 00:25:18 2006
@@ -15,31 +15,27 @@
 
 package org.apache.harmony.nio.tests.java.nio;
 
-import java.io.IOException;
 import java.nio.BufferOverflowException;
 
 import junit.framework.TestCase;
-import tests.util.SerializationTester;
+
+import org.apache.harmony.testframework.serialization.SerializationTest;
 
 public class BufferOverflowExceptionTest extends TestCase {
 
     /**
-     * @tests serialization/deserilazation compatibility.
+     * @tests serialization/deserialization compatibility.
      */
-    public void test_serialization() throws IOException, ClassNotFoundException {
-        BufferOverflowException object = new BufferOverflowException();
-        BufferOverflowException deObject = (BufferOverflowException) SerializationTester
-                .getDeserilizedObject(object);
-        assertEquals(deObject.getMessage(),object.getMessage());
+    public void testSerializationSelf() throws Exception {
+
+        SerializationTest.verifySelf(new BufferOverflowException());
     }
 
     /**
-     * @tests serialization/deserilazation compatibility with RI.
+     * @tests serialization/deserialization compatibility with RI.
      */
-    public void test_compatibilitySerialization() throws Exception {
-        BufferOverflowException object = new BufferOverflowException();
-        BufferOverflowException deObject = (BufferOverflowException)SerializationTester.readObject(object,
-                "serialization/java/nio/BufferOverflowException.golden.ser");
-        assertEquals(deObject.getMessage(),object.getMessage());
+    public void testSerializationCompatibility() throws Exception {
+
+        SerializationTest.verifyGolden(this, new BufferOverflowException());
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/BufferUnderflowExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/BufferUnderflowExceptionTest.java?view=diff&rev=443275&r1=443274&r2=443275
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/BufferUnderflowExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/BufferUnderflowExceptionTest.java
Thu Sep 14 00:25:18 2006
@@ -15,11 +15,11 @@
 
 package org.apache.harmony.nio.tests.java.nio;
 
-import java.io.IOException;
 import java.nio.BufferUnderflowException;
 
 import junit.framework.TestCase;
-import tests.util.SerializationTester;
+
+import org.apache.harmony.testframework.serialization.SerializationTest;
 
 /**
  * Tests for BufferUnderflowException
@@ -29,20 +29,16 @@
     /**
      * @tests serialization/deserialization compatibility.
      */
-    public void test_serialization() throws IOException, ClassNotFoundException {
-        BufferUnderflowException object = new BufferUnderflowException();
-        BufferUnderflowException deObject = (BufferUnderflowException) SerializationTester
-                .getDeserilizedObject(object);
-        assertNotNull(deObject);
+    public void testSerializationSelf() throws Exception {
+
+        SerializationTest.verifySelf(new BufferUnderflowException());
     }
 
     /**
      * @tests serialization/deserialization compatibility with RI.
      */
-    public void test_compatibilitySerialization() throws Exception {
-        BufferUnderflowException object = new BufferUnderflowException();
-        BufferUnderflowException deObject = (BufferUnderflowException)SerializationTester.readObject(object,
-                "serialization/java/nio/BufferUnderflowExceptionTest.golden.ser");
-        assertNotNull(deObject);
+    public void testSerializationCompatibility() throws Exception {
+
+        SerializationTest.verifyGolden(this, new BufferUnderflowException());
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/InvalidMarkExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/InvalidMarkExceptionTest.java?view=diff&rev=443275&r1=443274&r2=443275
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/InvalidMarkExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/InvalidMarkExceptionTest.java
Thu Sep 14 00:25:18 2006
@@ -14,34 +14,27 @@
  */
 package org.apache.harmony.nio.tests.java.nio;
 
-import java.io.IOException;
 import java.nio.InvalidMarkException;
 
 import junit.framework.TestCase;
-import tests.util.SerializationTester;
-
 
+import org.apache.harmony.testframework.serialization.SerializationTest;
 
 public class InvalidMarkExceptionTest extends TestCase {
 
     /**
      * @tests serialization/deserialization compatibility.
      */
-    public void test_serialization() throws IOException, ClassNotFoundException {
-        InvalidMarkException object = new InvalidMarkException();
-        InvalidMarkException deObject = (InvalidMarkException) SerializationTester
-                .getDeserilizedObject(object);
-        assertNotNull(deObject);
+    public void testSerializationSelf() throws Exception {
+
+        SerializationTest.verifySelf(new InvalidMarkException());
     }
 
     /**
      * @tests serialization/deserialization compatibility with RI.
      */
-    public void test_compatibilitySerialization() throws Exception {
-        InvalidMarkException object = new InvalidMarkException();
-        InvalidMarkException deObject = (InvalidMarkException) SerializationTester
-                .readObject(object,
-                        "serialization/java/nio/InvalidMarkExceptionTest.golden.ser");
-        assertNotNull(deObject);
+    public void testSerializationCompatibility() throws Exception {
+
+        SerializationTest.verifyGolden(this, new InvalidMarkException());
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ReadOnlyBufferExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ReadOnlyBufferExceptionTest.java?view=diff&rev=443275&r1=443274&r2=443275
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ReadOnlyBufferExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ReadOnlyBufferExceptionTest.java
Thu Sep 14 00:25:18 2006
@@ -14,32 +14,27 @@
  */
 package org.apache.harmony.nio.tests.java.nio;
 
-import java.io.IOException;
 import java.nio.ReadOnlyBufferException;
 
 import junit.framework.TestCase;
-import tests.util.SerializationTester;
+
+import org.apache.harmony.testframework.serialization.SerializationTest;
 
 public class ReadOnlyBufferExceptionTest extends TestCase {
 
     /**
      * @tests serialization/deserialization compatibility.
      */
-    public void test_serialization() throws IOException, ClassNotFoundException {
-        ReadOnlyBufferException object = new ReadOnlyBufferException();
-        ReadOnlyBufferException deObject = (ReadOnlyBufferException) SerializationTester
-                .getDeserilizedObject(object);
-        assertNotNull(deObject);
+    public void testSerializationSelf() throws Exception {
+
+        SerializationTest.verifySelf(new ReadOnlyBufferException());
     }
 
     /**
      * @tests serialization/deserialization compatibility with RI.
      */
-    public void test_compatibilitySerialization() throws Exception {
-        ReadOnlyBufferException object = new ReadOnlyBufferException();
-        ReadOnlyBufferException deObject = (ReadOnlyBufferException) SerializationTester
-                .readObject(object,
-                        "serialization/java/nio/ReadOnlyBufferExceptionTest.golden.ser");
-        assertNotNull(deObject);
+    public void testSerializationCompatibility() throws Exception {
+
+        SerializationTest.verifyGolden(this, new ReadOnlyBufferException());
     }
 }



Mime
View raw message