directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1733693 - /directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/RdnTest.java
Date Sat, 05 Mar 2016 09:26:35 GMT
Author: seelmann
Date: Sat Mar  5 09:26:35 2016
New Revision: 1733693

URL: http://svn.apache.org/viewvc?rev=1733693&view=rev
Log:
Adapt tests, RDN with same AT used twice is allowed

Modified:
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/RdnTest.java

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/RdnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/RdnTest.java?rev=1733693&r1=1733692&r2=1733693&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/RdnTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/name/RdnTest.java
Sat Mar  5 09:26:35 2016
@@ -1239,12 +1239,14 @@ public class RdnTest
 
 
     /**
-     * test that a RDN with an attributeType used twice throws an exception
+     * test that a RDN can have an attributeType twice
      */
-    @Test( expected=LdapInvalidDnException.class )
-    public void testWrongRdnAtUsedTwice() throws LdapException
+    @Test
+    public void testRdnAtUsedTwice() throws LdapException
     {
-        new Rdn( " A = b + A = d " );
+        Rdn rdn = new Rdn( " A = b + A = d " );
+
+        assertEquals( " A = b + A = d ", rdn.getName() );
     }
 
 
@@ -1263,11 +1265,13 @@ public class RdnTest
 
 
     /**
-     * test that a RDN with an attributeType used twice throws an exception
+     * test that a RDN can have an attributeType twice
      */
-    @Test(expected = LdapInvalidDnException.class)
-    public void testAvaConstructorWrongRdnAtUsedTwice() throws LdapException
+    @Test
+    public void testAvaConstructorRdnAtUsedTwice() throws LdapException
     {
-        new Rdn( new Ava( "A", "b" ), new Ava( "A", "d" ) );
+        Rdn rdn = new Rdn( new Ava( "A", "b" ), new Ava( "A", "d" ) );
+
+        assertEquals( "A=b+A=d", rdn.getName() );
     }
 }



Mime
View raw message