harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r394056 - in /incubator/harmony/enhanced/classlib/trunk/modules/x-net: make/common/ src/test/java/javax/net/ssl/serialization/
Date Fri, 14 Apr 2006 09:34:42 GMT
Author: mloenko
Date: Fri Apr 14 02:34:40 2006
New Revision: 394056

URL: http://svn.apache.org/viewcvs?rev=394056&view=rev
Log:
regression tests for fix in revision 393463 (comment: added serialVersionUIDs)

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/HandshakeCompletedEventTest.0.dat
  (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/HandshakeCompletedEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLSessionBindingEventTest.0.dat
  (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLSessionBindingEventTest.java
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml

Modified: incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml?rev=394056&r1=394055&r2=394056&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/make/common/build.xml Fri Apr
14 02:34:40 2006
@@ -107,6 +107,11 @@
 				<fileset dir="${hy.x-net.src.test.java}">
 					<include name="**/*Test.java"/>
 
+					<!-- Harmony exclude list -->
+	<!-- FIXME: The following tests require JSSE provider -->
+					<exclude name="javax/net/ssl/serialization/HandshakeCompletedEventTest.java"/>
+					<exclude name="javax/net/ssl/serialization/SSLSessionBindingEventTest.java"/>
+
 	<!-- FIXME: The following tests are excluded because they fail for reasons to be determined
-->
                     <exclude name="**/DefaultSSLServerSocketFactoryTest.java"/>
                     <exclude name="**/DefaultSSLSocketFactoryTest.java"/>

Added: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/HandshakeCompletedEventTest.0.dat
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/HandshakeCompletedEventTest.0.dat?rev=394056&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/HandshakeCompletedEventTest.0.dat
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/HandshakeCompletedEventTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/HandshakeCompletedEventTest.java?rev=394056&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/HandshakeCompletedEventTest.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/HandshakeCompletedEventTest.java
Fri Apr 14 02:34:40 2006
@@ -0,0 +1,50 @@
+/*
+ *  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 javax.net.ssl.serialization;
+
+import javax.net.ssl.HandshakeCompletedEvent;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSocket;
+
+import org.apache.harmony.security.test.SerializationTest;
+
+/**
+ * Test for HandshakeCompletedEvent seialization
+ * 
+ */
+
+public class HandshakeCompletedEventTest extends SerializationTest {
+
+    protected Object[] getData() {
+        try {
+            SSLContext cont = SSLContext.getInstance("TLS");
+            cont.init(null, null, null);
+            SSLSocket soc = (SSLSocket )cont.getSocketFactory().createSocket();
+            return new Object[] { new HandshakeCompletedEvent(soc, soc.getSession())};
+        } catch (Exception e) {
+            fail("Can not create data: "+ e);
+            return null;
+        }
+        
+    }
+
+    protected void assertDeserialized(Object oref, Object otest) {
+        HandshakeCompletedEvent test = (HandshakeCompletedEvent) otest;
+        test.getSession();
+        test.getSocket();
+    }
+}
\ No newline at end of file

Added: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLSessionBindingEventTest.0.dat
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLSessionBindingEventTest.0.dat?rev=394056&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLSessionBindingEventTest.0.dat
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLSessionBindingEventTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLSessionBindingEventTest.java?rev=394056&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLSessionBindingEventTest.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/x-net/src/test/java/javax/net/ssl/serialization/SSLSessionBindingEventTest.java
Fri Apr 14 02:34:40 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 javax.net.ssl.serialization;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSessionBindingEvent;
+import javax.net.ssl.SSLSocket;
+
+import org.apache.harmony.security.test.SerializationTest;
+
+/**
+ * Test for SSLSessionBindingEvent seialization
+ * 
+ */
+
+public class SSLSessionBindingEventTest extends SerializationTest {
+
+    protected Object[] getData() {
+        try {
+            SSLContext cont = SSLContext.getInstance("TLS");
+            cont.init(null, null, null);
+            SSLSocket soc = (SSLSocket )cont.getSocketFactory().createSocket();
+            return new Object[] { new SSLSessionBindingEvent(soc.getSession(), "someName")};
+        } catch (Exception e) {
+            fail("Can not create data: "+ e);
+            return null;
+        }
+    }
+
+    protected void assertDeserialized(Object oref, Object otest) {
+        SSLSessionBindingEvent ref = (SSLSessionBindingEvent) oref;
+        SSLSessionBindingEvent test = (SSLSessionBindingEvent) otest;
+        assertEquals(ref.getName(), test.getName());
+    }
+}
\ No newline at end of file



Mime
View raw message