harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lian...@apache.org
Subject svn commit: r508439 - in /harmony/enhanced/classlib/trunk/modules/jndi: make/exclude.common src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/SortKeyTest.java
Date Fri, 16 Feb 2007 15:08:06 GMT
Author: liangyx
Date: Fri Feb 16 07:08:05 2007
New Revision: 508439

URL: http://svn.apache.org/viewvc?view=rev&rev=508439
Log:
update SortKeyTest accroding to spec

Modified:
    harmony/enhanced/classlib/trunk/modules/jndi/make/exclude.common
    harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/SortKeyTest.java

Modified: harmony/enhanced/classlib/trunk/modules/jndi/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/make/exclude.common?view=diff&rev=508439&r1=508438&r2=508439
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/make/exclude.common (original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/make/exclude.common Fri Feb 16 07:08:05 2007
@@ -1 +1 @@
-org/apache/harmony/jndi/tests/javax/naming/ldap/SortKeyTest.java
+

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/SortKeyTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/SortKeyTest.java?view=diff&rev=508439&r1=508438&r2=508439
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/SortKeyTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/SortKeyTest.java
Fri Feb 16 07:08:05 2007
@@ -28,16 +28,29 @@
         assertTrue(sk.isAscending());
         assertNull(sk.getMatchingRuleID());
         
-        sk = new SortKey(null);
-        assertNull(sk.getAttributeID());
+        try {
+            sk = new SortKey(null);
+            fail("Should throw NullPointerException.");
+        } catch (NullPointerException e) {
+            //expected
+        }
+        
+        
         
         sk = new SortKey("attributeId", false, "matchingRuleId");
         assertEquals("attributeId", sk.getAttributeID());
         assertFalse(sk.isAscending());
         assertEquals("matchingRuleId", sk.getMatchingRuleID());
         
-        sk = new SortKey(null, true, null);
-        assertNull(sk.getAttributeID());
+        try {
+            sk = new SortKey(null, true, null);
+            fail("Should throw NullPointerException.");
+        } catch (NullPointerException e) {
+            //expected
+        }
+        
+        sk = new SortKey("attributeId", true, null);
+        assertEquals("attributeId", sk.getAttributeID());
         assertTrue(sk.isAscending());
         assertNull(sk.getMatchingRuleID());
     }



Mime
View raw message