harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r419204 - in /incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test: java/org/apache/harmony/tests/java/nio/channels/ resources/serialization/java/nio/channels/
Date Wed, 05 Jul 2006 10:27:32 GMT
Author: tellison
Date: Wed Jul  5 03:27:30 2006
New Revision: 419204

URL: http://svn.apache.org/viewvc?rev=419204&view=rev
Log:
Apply patch for HARMONY-763 ([classlib][nio] Tests for java.nio.channels.ClosedChannelException
are missing)

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/ClosedChannelExceptionTest.java
  (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/ClosedChannelExceptionTest.golden.ser
  (with props)
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/AllTests.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/AllTests.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/AllTests.java?rev=419204&r1=419203&r2=419204&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/AllTests.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/AllTests.java
Wed Jul  5 03:27:30 2006
@@ -41,6 +41,7 @@
         suite.addTestSuite(AsynchronousCloseExceptionTest.class);
         suite.addTestSuite(CancelledKeyExceptionTest.class);
         suite.addTestSuite(ClosedByInterruptExceptionTest.class);
+        suite.addTestSuite(ClosedChannelExceptionTest.class);
         //$JUnit-END$
         return suite;
     }

Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/ClosedChannelExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/ClosedChannelExceptionTest.java?rev=419204&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/ClosedChannelExceptionTest.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/ClosedChannelExceptionTest.java
Wed Jul  5 03:27:30 2006
@@ -0,0 +1,48 @@
+/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.harmony.tests.java.nio.channels;
+
+import java.io.IOException;
+import java.nio.channels.ClosedChannelException;
+
+import junit.framework.TestCase;
+import tests.util.SerializationTester;
+
+/**
+ * Tests for ClosedChannelException
+ */
+public class ClosedChannelExceptionTest extends TestCase {
+
+    /**
+     * @tests serialization/deserialization compatibility.
+     */
+    public void test_serialization() throws IOException, ClassNotFoundException {
+        ClosedChannelException object = new ClosedChannelException();
+        ClosedChannelException deObject = (ClosedChannelException) SerializationTester
+                .getDeserilizedObject(object);
+        assertNotNull(deObject);
+    }
+
+    /**
+     * @tests serialization/deserialization compatibility with RI.
+     */
+    public void test_compatibilitySerialization() throws Exception {
+        ClosedChannelException object = new ClosedChannelException();
+        ClosedChannelException deObject = (ClosedChannelException) SerializationTester
+                .readObject(object,
+                        "serialization/java/nio/channels/ClosedChannelExceptionTest.golden.ser");
+        assertNotNull(deObject);
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/ClosedChannelExceptionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/ClosedChannelExceptionTest.golden.ser
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/ClosedChannelExceptionTest.golden.ser?rev=419204&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/ClosedChannelExceptionTest.golden.ser
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message