You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gh...@apache.org on 2006/06/29 13:47:32 UTC

svn commit: r418018 - in /incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test: java/org/apache/harmony/tests/java/nio/channels/ resources/serialization/java/nio/channels/

Author: gharley
Date: Thu Jun 29 04:47:31 2006
New Revision: 418018

URL: http://svn.apache.org/viewvc?rev=418018&view=rev
Log:
HARMONY 702 : Tests for java.nio.channels.CancelledKeyException are missing.

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/CancelledKeyExceptionTest.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/CancelledKeyExceptionTest.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=418018&r1=418017&r2=418018&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 Thu Jun 29 04:47:31 2006
@@ -39,6 +39,7 @@
         suite.addTestSuite(SelectableChannelTest.class);
         suite.addTestSuite(FileLockTest.class);
         suite.addTestSuite(AsynchronousCloseExceptionTest.class);
+        suite.addTestSuite(CancelledKeyExceptionTest.class);
         //$JUnit-END$
         return suite;
     }

Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/CancelledKeyExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/CancelledKeyExceptionTest.java?rev=418018&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/CancelledKeyExceptionTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/org/apache/harmony/tests/java/nio/channels/CancelledKeyExceptionTest.java Thu Jun 29 04:47:31 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.CancelledKeyException;
+
+import junit.framework.TestCase;
+import tests.util.SerializationTester;
+
+/**
+ * Tests for CancelledKeyException
+ */
+public class CancelledKeyExceptionTest extends TestCase {
+
+    /**
+     * @tests serialization/deserialization compatibility.
+     */
+    public void test_serialization() throws IOException, ClassNotFoundException {
+        CancelledKeyException object = new CancelledKeyException();
+        CancelledKeyException deObject = (CancelledKeyException) SerializationTester
+                .getDeserilizedObject(object);
+        assertNotNull(deObject);
+    }
+
+    /**
+     * @tests serialization/deserialization compatibility with RI.
+     */
+    public void test_compatibilitySerialization() throws Exception {
+        CancelledKeyException object = new CancelledKeyException();
+        CancelledKeyException deObject = (CancelledKeyException) SerializationTester
+                .readObject(object,
+                        "serialization/java/nio/channels/CancelledKeyExceptionTest.golden.ser");
+        assertNotNull(deObject);
+    }
+}

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

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

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