harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r644260 - /harmony/enhanced/classlib/trunk/modules/x-net/src/test/api/java/org/apache/harmony/xnet/tests/javax/net/ssl/HandshakeCompletedEventTest.java
Date Thu, 03 Apr 2008 11:05:10 GMT
Author: smishura
Date: Thu Apr  3 04:05:06 2008
New Revision: 644260

URL: http://svn.apache.org/viewvc?rev=644260&view=rev
Log:
Fix JUnit style

Modified:
    harmony/enhanced/classlib/trunk/modules/x-net/src/test/api/java/org/apache/harmony/xnet/tests/javax/net/ssl/HandshakeCompletedEventTest.java

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/test/api/java/org/apache/harmony/xnet/tests/javax/net/ssl/HandshakeCompletedEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/test/api/java/org/apache/harmony/xnet/tests/javax/net/ssl/HandshakeCompletedEventTest.java?rev=644260&r1=644259&r2=644260&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/test/api/java/org/apache/harmony/xnet/tests/javax/net/ssl/HandshakeCompletedEventTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/test/api/java/org/apache/harmony/xnet/tests/javax/net/ssl/HandshakeCompletedEventTest.java
Thu Apr  3 04:05:06 2008
@@ -29,10 +29,8 @@
 
 import junit.framework.TestCase;
 
-
 /**
  * Tests for <code>HandshakeCompletedEvent</code> class constructors and methods.
- * 
  */
 public class HandshakeCompletedEventTest extends TestCase {
 
@@ -87,14 +85,9 @@
         SSLSession ses = new MySSLSession();
 
         HandshakeCompletedEvent event = new HandshakeCompletedEvent(soc, ses);
-        String name = event.getCipherSuite();
-        String name_ses = ses.getCipherSuite();
-        if (name == null && name_ses != null) {
-            fail("incorrect null CipherCuite");
-        }
-        if (!name.equals(name_ses)) {
-            fail("incorrect CipherCuite");
-        }
+        
+        assertNotNull(event.getCipherSuite());
+        assertNull(ses.getCipherSuite());
     }
 
     public final void testGetLocalCertificates() {
@@ -151,12 +144,8 @@
         }
     	SSLSession ses = new MySSLSession();
         HandshakeCompletedEvent event = new HandshakeCompletedEvent(soc, ses);
-        if (!ses.equals(event.getSession())) {
-            fail("incorrect session");
-        }
-        if (!soc.equals(event.getSocket())) {
-            fail("incorrect socket");
-        }
+        
+        assertEquals(ses, event.getSession());
+        assertEquals(soc, event.getSocket());
     }
-
 }



Mime
View raw message