Author: pyang
Date: Fri Jul 21 00:12:51 2006
New Revision: 424209
URL: http://svn.apache.org/viewvc?rev=424209&view=rev
Log:
Fix for HARMONY-936 ([classlib][nio] Tests for java.nio.channels.OverlappingFileLockException,UnresolvedAddressException,UnsupportedAddressTypeException
are missing)
Added:
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/OverlappingFileLockExceptionTest.java
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/UnresolvedAddressExceptionTest.java
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/UnsupportedAddressTypeExceptionTest.java
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/OverlappingFileLockExceptionTest.golden.ser
(with props)
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/UnresolvedAddressExceptionTest.golden.ser
(with props)
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/UnsupportedAddressTypeExceptionTest.golden.ser
(with props)
Modified:
incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/AllTests.java
Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/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/common/org/apache/harmony/tests/java/nio/channels/AllTests.java?rev=424209&r1=424208&r2=424209&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/AllTests.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/AllTests.java
Fri Jul 21 00:12:51 2006
@@ -52,6 +52,9 @@
suite.addTestSuite(NonWritableChannelExceptionTest.class);
suite.addTestSuite(NotYetBoundExceptionTest.class);
suite.addTestSuite(NotYetConnectedExceptionTest.class);
+ suite.addTestSuite(OverlappingFileLockExceptionTest.class);
+ suite.addTestSuite(UnresolvedAddressExceptionTest.class);
+ suite.addTestSuite(UnsupportedAddressTypeExceptionTest.class);
suite.addTestSuite(MapModeTest.class);
// $JUnit-END$
return suite;
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/OverlappingFileLockExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/OverlappingFileLockExceptionTest.java?rev=424209&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/OverlappingFileLockExceptionTest.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/OverlappingFileLockExceptionTest.java
Fri Jul 21 00:12:51 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.OverlappingFileLockException;
+
+import junit.framework.TestCase;
+import tests.util.SerializationTester;
+
+/**
+ * Tests for OverlappingFileLockException
+ */
+public class OverlappingFileLockExceptionTest extends TestCase {
+
+ /**
+ * @tests serialization/deserialization compatibility.
+ */
+ public void test_serialization() throws IOException, ClassNotFoundException {
+ OverlappingFileLockException object = new OverlappingFileLockException();
+ OverlappingFileLockException deObject = (OverlappingFileLockException) SerializationTester
+ .getDeserilizedObject(object);
+ assertNotNull(deObject);
+ }
+
+ /**
+ * @tests serialization/deserialization compatibility with RI.
+ */
+ public void test_compatibilitySerialization() throws Exception {
+ OverlappingFileLockException object = new OverlappingFileLockException();
+ OverlappingFileLockException deObject = (OverlappingFileLockException) SerializationTester
+ .readObject(object,
+ "serialization/java/nio/channels/OverlappingFileLockExceptionTest.golden.ser");
+ assertNotNull(deObject);
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/UnresolvedAddressExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/UnresolvedAddressExceptionTest.java?rev=424209&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/UnresolvedAddressExceptionTest.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/UnresolvedAddressExceptionTest.java
Fri Jul 21 00:12:51 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.UnresolvedAddressException;
+
+import junit.framework.TestCase;
+import tests.util.SerializationTester;
+
+/**
+ * Tests for UnresolvedAddressException
+ */
+public class UnresolvedAddressExceptionTest extends TestCase {
+
+ /**
+ * @tests serialization/deserialization compatibility.
+ */
+ public void test_serialization() throws IOException, ClassNotFoundException {
+ UnresolvedAddressException object = new UnresolvedAddressException();
+ UnresolvedAddressException deObject = (UnresolvedAddressException) SerializationTester
+ .getDeserilizedObject(object);
+ assertNotNull(deObject);
+ }
+
+ /**
+ * @tests serialization/deserialization compatibility with RI.
+ */
+ public void test_compatibilitySerialization() throws Exception {
+ UnresolvedAddressException object = new UnresolvedAddressException();
+ UnresolvedAddressException deObject = (UnresolvedAddressException) SerializationTester
+ .readObject(object,
+ "serialization/java/nio/channels/UnresolvedAddressExceptionTest.golden.ser");
+ assertNotNull(deObject);
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/UnsupportedAddressTypeExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/UnsupportedAddressTypeExceptionTest.java?rev=424209&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/UnsupportedAddressTypeExceptionTest.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/java/common/org/apache/harmony/tests/java/nio/channels/UnsupportedAddressTypeExceptionTest.java
Fri Jul 21 00:12:51 2006
@@ -0,0 +1,49 @@
+/* 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.UnsupportedAddressTypeException;
+
+import junit.framework.TestCase;
+import tests.util.SerializationTester;
+
+/**
+ * Tests for UnsupportedAddressTypeException
+ */
+public class UnsupportedAddressTypeExceptionTest extends TestCase {
+
+ /**
+ * @tests serialization/deserialization compatibility.
+ */
+ public void test_serialization() throws IOException, ClassNotFoundException {
+ UnsupportedAddressTypeException object = new UnsupportedAddressTypeException();
+ UnsupportedAddressTypeException deObject = (UnsupportedAddressTypeException) SerializationTester
+ .getDeserilizedObject(object);
+ assertNotNull(deObject);
+ }
+
+ /**
+ * @tests serialization/deserialization compatibility with RI.
+ */
+ public void test_compatibilitySerialization() throws Exception {
+ UnsupportedAddressTypeException object = new UnsupportedAddressTypeException();
+ UnsupportedAddressTypeException deObject = (UnsupportedAddressTypeException) SerializationTester
+ .readObject(
+ object,
+ "serialization/java/nio/channels/UnsupportedAddressTypeExceptionTest.golden.ser");
+ assertNotNull(deObject);
+ }
+}
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/OverlappingFileLockExceptionTest.golden.ser
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/OverlappingFileLockExceptionTest.golden.ser?rev=424209&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/OverlappingFileLockExceptionTest.golden.ser
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/UnresolvedAddressExceptionTest.golden.ser
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/UnresolvedAddressExceptionTest.golden.ser?rev=424209&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/UnresolvedAddressExceptionTest.golden.ser
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/UnsupportedAddressTypeExceptionTest.golden.ser
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/UnsupportedAddressTypeExceptionTest.golden.ser?rev=424209&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/test/resources/serialization/java/nio/channels/UnsupportedAddressTypeExceptionTest.golden.ser
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
|