directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r652410 [14/14] - in /directory: apacheds/branches/bigbang/ apacheds/branches/bigbang/apacheds-jdbm/ apacheds/branches/bigbang/apacheds-jdbm/src/ apacheds/branches/bigbang/apacheds-jdbm/src/etc/ apacheds/branches/bigbang/apacheds-jdbm/src/e...
Date Thu, 01 May 2008 00:06:46 GMT
Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java?rev=652410&r1=652409&r2=652410&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
Wed Apr 30 17:06:41 2008
@@ -193,7 +193,7 @@
         assertNotNull( assertion );
 
         assertEquals( "objectclass", assertion.getAttributeDesc() );
-        assertEquals( "top", assertion.getAssertionValue().toString() );
+        assertEquals( "top", assertion.getAssertionValue().get() );
 
         // (& (| (objectclass=top) (ou=contacts) ) (...
         equalityMatch = ( AttributeValueAssertionFilter ) orFilters.get( 1 );
@@ -203,7 +203,7 @@
         assertNotNull( assertion );
 
         assertEquals( "ou", assertion.getAttributeDesc() );
-        assertEquals( "contacts", assertion.getAssertionValue().toString() );
+        assertEquals( "contacts", assertion.getAssertionValue().get() );
 
         // (& (| (objectclass=top) (ou=contacts) ) (! ...
         NotFilter notFilter = ( NotFilter ) andFilters.get( 1 );
@@ -217,7 +217,7 @@
         assertNotNull( assertion );
 
         assertEquals( "objectclass", assertion.getAttributeDesc() );
-        assertEquals( "ttt", assertion.getAssertionValue().toString() );
+        assertEquals( "ttt", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
 
@@ -357,7 +357,7 @@
         assertNotNull( assertion );
 
         assertEquals( "objectclass", assertion.getAttributeDesc() );
-        assertEquals( "top", assertion.getAssertionValue().toString() );
+        assertEquals( "top", assertion.getAssertionValue().get() );
 
         // (& (| (objectclass~=top) (ou<=contacts) ) (...
         AttributeValueAssertionFilter lessOrEqual = ( AttributeValueAssertionFilter ) orFilters.get(
1 );
@@ -367,7 +367,7 @@
         assertNotNull( assertion );
 
         assertEquals( "ou", assertion.getAttributeDesc() );
-        assertEquals( "contacts", assertion.getAssertionValue().toString() );
+        assertEquals( "contacts", assertion.getAssertionValue().get() );
 
         // (& (| (objectclass~=top) (ou<=contacts) ) (! ...
         NotFilter notFilter = ( NotFilter ) andFilters.get( 1 );
@@ -381,7 +381,7 @@
         assertNotNull( assertion );
 
         assertEquals( "objectclass", assertion.getAttributeDesc() );
-        assertEquals( "ttt", assertion.getAssertionValue().toString() );
+        assertEquals( "ttt", assertion.getAssertionValue().get() );
 
         // The attributes
         Attributes attributes = sr.getAttributes();
@@ -548,7 +548,7 @@
         assertNotNull( assertion );
 
         assertEquals( "objectclass", assertion.getAttributeDesc() );
-        assertEquals( "ttt", assertion.getAssertionValue().toString() );
+        assertEquals( "ttt", assertion.getAssertionValue().get() );
 
         // The attributes
         Attributes attributes = sr.getAttributes();
@@ -942,31 +942,31 @@
             .getAssertion();
 
         assertEquals( "uid", assertion.getAttributeDesc() );
-        assertEquals( "akarasulu", assertion.getAssertionValue().toString() );
+        assertEquals( "akarasulu", assertion.getAssertionValue().get() );
 
         // cn=aok
         assertion = ( ( AttributeValueAssertionFilter ) orFilter.getOrFilter().get( 1 ) ).getAssertion();
 
         assertEquals( "cn", assertion.getAttributeDesc() );
-        assertEquals( "aok", assertion.getAssertionValue().toString() );
+        assertEquals( "aok", assertion.getAssertionValue().get() );
 
         // ou = Human Resources
         assertion = ( ( AttributeValueAssertionFilter ) orFilter.getOrFilter().get( 2 ) ).getAssertion();
 
         assertEquals( "ou", assertion.getAttributeDesc() );
-        assertEquals( "Human Resources", assertion.getAssertionValue().toString() );
+        assertEquals( "Human Resources", assertion.getAssertionValue().get() );
 
         // l=Santa Clara
         assertion = ( ( AttributeValueAssertionFilter ) orFilter.getOrFilter().get( 3 ) ).getAssertion();
 
         assertEquals( "l", assertion.getAttributeDesc() );
-        assertEquals( "Santa Clara", assertion.getAssertionValue().toString() );
+        assertEquals( "Santa Clara", assertion.getAssertionValue().get() );
 
         // cn=abok
         assertion = ( ( AttributeValueAssertionFilter ) orFilter.getOrFilter().get( 4 ) ).getAssertion();
 
         assertEquals( "cn", assertion.getAttributeDesc() );
-        assertEquals( "abok", assertion.getAssertionValue().toString() );
+        assertEquals( "abok", assertion.getAssertionValue().get() );
 
         // The attributes
         Attributes attributes = sr.getAttributes();
@@ -1223,7 +1223,7 @@
         assertNotNull( assertion );
 
         assertEquals( "objectclass", assertion.getAttributeDesc() );
-        assertEquals( "top", assertion.getAssertionValue().toString() );
+        assertEquals( "top", assertion.getAssertionValue().get() );
 
         // (& (| (objectclass=top) (ou=contacts) ) (...
         equalityMatch = ( AttributeValueAssertionFilter ) orFilters.get( 1 );
@@ -1233,7 +1233,7 @@
         assertNotNull( assertion );
 
         assertEquals( "2.5.4.11", assertion.getAttributeDesc() );
-        assertEquals( "contacts", assertion.getAssertionValue().toString() );
+        assertEquals( "contacts", assertion.getAssertionValue().get() );
 
         // (& (| (objectclass=top) (ou=contacts) ) (! ...
         NotFilter notFilter = ( NotFilter ) andFilters.get( 1 );
@@ -1247,7 +1247,7 @@
         assertNotNull( assertion );
 
         assertEquals( "organizationalUnitName", assertion.getAttributeDesc() );
-        assertEquals( "ttt", assertion.getAssertionValue().toString() );
+        assertEquals( "ttt", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
 
@@ -1530,7 +1530,7 @@
         assertNotNull( assertion );
 
         assertEquals( "objectclass", assertion.getAttributeDesc() );
-        assertEquals( "top", assertion.getAssertionValue().toString() );
+        assertEquals( "top", assertion.getAssertionValue().get() );
 
         // (& (| (objectclass=top) (ou=contacts) ) (...
         equalityMatch = ( AttributeValueAssertionFilter ) orFilters.get( 1 );
@@ -1540,7 +1540,7 @@
         assertNotNull( assertion );
 
         assertEquals( "ou", assertion.getAttributeDesc() );
-        assertEquals( "contacts", assertion.getAssertionValue().toString() );
+        assertEquals( "contacts", assertion.getAssertionValue().get() );
 
         // (& (| (objectclass=top) (ou=contacts) ) (! ...
         NotFilter notFilter = ( NotFilter ) andFilters.get( 1 );
@@ -1554,7 +1554,7 @@
         assertNotNull( assertion );
 
         assertEquals( "objectclass", assertion.getAttributeDesc() );
-        assertEquals( "ttt", assertion.getAssertionValue().toString() );
+        assertEquals( "ttt", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
 
@@ -2506,7 +2506,7 @@
         AttributeValueAssertion assertion = greaterThanFilter.getAssertion();
 
         assertEquals( "test", assertion.getAttributeDesc() );
-        assertEquals( "", assertion.getAssertionValue().toString() );
+        assertEquals( "", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
 
@@ -2588,7 +2588,7 @@
         AttributeValueAssertion assertion = greaterThanFilter.getAssertion();
 
         assertEquals( "test", assertion.getAttributeDesc() );
-        assertEquals( "", assertion.getAssertionValue().toString() );
+        assertEquals( "", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
 
@@ -2686,7 +2686,7 @@
         AttributeValueAssertion assertion = greaterThanFilter.getAssertion();
 
         assertEquals( "test", assertion.getAttributeDesc() );
-        assertEquals( "", assertion.getAssertionValue().toString() );
+        assertEquals( "", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
 
@@ -2946,7 +2946,7 @@
         assertNotNull( assertion );
 
         assertEquals( "pgpdisabled", assertion.getAttributeDesc() );
-        assertEquals( "0", assertion.getAssertionValue().toString() );
+        assertEquals( "0", assertion.getAssertionValue().get() );
 
         // Check the encoding
         // We won't check the whole PDU, as it may differs because
@@ -3043,7 +3043,7 @@
         assertNotNull( assertion );
 
         assertEquals( "a", assertion.getAttributeDesc() );
-        assertEquals( "b", assertion.getAssertionValue().toString() );
+        assertEquals( "b", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -3151,7 +3151,7 @@
         assertNotNull( assertion );
 
         assertEquals( "a", assertion.getAttributeDesc() );
-        assertEquals( "b", assertion.getAssertionValue().toString() );
+        assertEquals( "b", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -3264,7 +3264,7 @@
         assertNotNull( assertion );
 
         assertEquals( "a", assertion.getAttributeDesc() );
-        assertEquals( "b", assertion.getAssertionValue().toString() );
+        assertEquals( "b", assertion.getAssertionValue().get() );
 
         // (&(a=b)(c=d))
         equalityMatch = ( AttributeValueAssertionFilter ) andFilters.get( 1 );
@@ -3274,7 +3274,7 @@
         assertNotNull( assertion );
 
         assertEquals( "c", assertion.getAttributeDesc() );
-        assertEquals( "d", assertion.getAssertionValue().toString() );
+        assertEquals( "d", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -3388,7 +3388,7 @@
         assertNotNull( assertion );
 
         assertEquals( "a", assertion.getAttributeDesc() );
-        assertEquals( "b", assertion.getAssertionValue().toString() );
+        assertEquals( "b", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -3508,7 +3508,7 @@
         assertNotNull( assertion );
 
         assertEquals( "a", assertion.getAttributeDesc() );
-        assertEquals( "b", assertion.getAssertionValue().toString() );
+        assertEquals( "b", assertion.getAssertionValue().get() );
 
         // (&(&(a=b)(c=d)
         equalityMatch = ( AttributeValueAssertionFilter ) andFilters2.get( 1 );
@@ -3518,7 +3518,7 @@
         assertNotNull( assertion );
 
         assertEquals( "c", assertion.getAttributeDesc() );
-        assertEquals( "d", assertion.getAssertionValue().toString() );
+        assertEquals( "d", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -3637,7 +3637,7 @@
         assertNotNull( assertion );
 
         assertEquals( "a", assertion.getAttributeDesc() );
-        assertEquals( "b", assertion.getAssertionValue().toString() );
+        assertEquals( "b", assertion.getAssertionValue().get() );
 
         // (&(&(a=b))(c=d))
         equalityMatch = ( AttributeValueAssertionFilter ) andFilters.get( 1 );
@@ -3647,7 +3647,7 @@
         assertNotNull( assertion );
 
         assertEquals( "c", assertion.getAttributeDesc() );
-        assertEquals( "d", assertion.getAssertionValue().toString() );
+        assertEquals( "d", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -3770,7 +3770,7 @@
         assertNotNull( assertion );
 
         assertEquals( "a", assertion.getAttributeDesc() );
-        assertEquals( "b", assertion.getAssertionValue().toString() );
+        assertEquals( "b", assertion.getAssertionValue().get() );
 
         // (&(&(a=b)(c=d)...
         equalityMatch = ( AttributeValueAssertionFilter ) andFilters2.get( 1 );
@@ -3780,7 +3780,7 @@
         assertNotNull( assertion );
 
         assertEquals( "c", assertion.getAttributeDesc() );
-        assertEquals( "d", assertion.getAssertionValue().toString() );
+        assertEquals( "d", assertion.getAssertionValue().get() );
         
         // (&(&(a=b)(c=d))(e=f))
         equalityMatch = ( AttributeValueAssertionFilter ) andFilters.get( 1 );
@@ -3790,7 +3790,7 @@
         assertNotNull( assertion );
 
         assertEquals( "e", assertion.getAttributeDesc() );
-        assertEquals( "f", assertion.getAssertionValue().toString() );
+        assertEquals( "f", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -3910,7 +3910,7 @@
         assertNotNull( assertion );
 
         assertEquals( "a", assertion.getAttributeDesc() );
-        assertEquals( "b", assertion.getAssertionValue().toString() );
+        assertEquals( "b", assertion.getAssertionValue().get() );
 
         // (&(&(a=b))(&...
         andFilter2 = ( AndFilter ) andFilters.get( 1 );
@@ -3927,7 +3927,7 @@
         assertNotNull( assertion );
 
         assertEquals( "c", assertion.getAttributeDesc() );
-        assertEquals( "d", assertion.getAssertionValue().toString() );
+        assertEquals( "d", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -4051,7 +4051,7 @@
         assertNotNull( assertion );
 
         assertEquals( "a", assertion.getAttributeDesc() );
-        assertEquals( "b", assertion.getAssertionValue().toString() );
+        assertEquals( "b", assertion.getAssertionValue().get() );
 
         // (&(&(a=b)(c=d))...
         equalityMatch = ( AttributeValueAssertionFilter ) andFilters2.get( 1 );
@@ -4061,7 +4061,7 @@
         assertNotNull( assertion );
 
         assertEquals( "c", assertion.getAttributeDesc() );
-        assertEquals( "d", assertion.getAssertionValue().toString() );
+        assertEquals( "d", assertion.getAssertionValue().get() );
         
         // (&(&(a=b)(c=d))(&...
         andFilter2 = ( AndFilter ) andFilters.get( 1 );
@@ -4078,7 +4078,7 @@
         assertNotNull( assertion );
 
         assertEquals( "e", assertion.getAttributeDesc() );
-        assertEquals( "f", assertion.getAssertionValue().toString() );
+        assertEquals( "f", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -4215,7 +4215,7 @@
         assertNotNull( assertion );
 
         assertEquals( "e", assertion.getAttributeDesc() );
-        assertEquals( "f", assertion.getAssertionValue().toString() );
+        assertEquals( "f", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -4377,7 +4377,7 @@
         assertNotNull( assertion );
 
         assertEquals( "uid", assertion.getAttributeDesc() );
-        assertEquals( "buster ", assertion.getAssertionValue().toString() );
+        assertEquals( "buster ", assertion.getAssertionValue().get() );
 
         // (&(uid=buster)(sbAttribute=Buy))
         equalityMatch = ( AttributeValueAssertionFilter ) andFilters.get( 1 );
@@ -4387,7 +4387,7 @@
         assertNotNull( assertion );
 
         assertEquals( "sbAttribute", assertion.getAttributeDesc() );
-        assertEquals( "Buy ", assertion.getAssertionValue().toString() );
+        assertEquals( "Buy ", assertion.getAssertionValue().get() );
 
         Attributes attributes = sr.getAttributes();
         assertEquals( 0, attributes.size() );
@@ -4486,7 +4486,7 @@
         assertNotNull( assertion );
 
         assertEquals( "objectClass", assertion.getAttributeDesc() );
-        assertEquals( "person", assertion.getAssertionValue().toString() );
+        assertEquals( "person", assertion.getAssertionValue().get() );
 
         // (&(a=b)(|
         OrFilter orFilter = ( OrFilter ) andFilters.get( 1 );
@@ -4512,6 +4512,6 @@
         assertNotNull( assertion );
 
         assertEquals( "sn", assertion.getAttributeDesc() );
-        assertEquals( "Jagger", assertion.getAssertionValue().toString() );
+        assertEquals( "Jagger", assertion.getAssertionValue().get() );
     }
 }

Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientStringValueTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientStringValueTest.java?rev=652410&r1=652409&r2=652410&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientStringValueTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/ClientStringValueTest.java
Wed Apr 30 17:06:41 2008
@@ -449,15 +449,15 @@
     {
         ClientStringValue csv = new ClientStringValue();
         
-        assertEquals( "'null'", csv.toString() );
+        assertEquals( "null", csv.toString() );
 
         csv.set( "" );
-        assertEquals( "''", csv.toString() );
+        assertEquals( "", csv.toString() );
 
         csv.set( "Test" );
-        assertEquals( "'Test'", csv.toString() );
+        assertEquals( "Test", csv.toString() );
         
         csv.clear();
-        assertEquals( "'null'", csv.toString() );
+        assertEquals( "null", csv.toString() );
     }
 }

Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientAttributeTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientAttributeTest.java?rev=652410&r1=652409&r2=652410&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientAttributeTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientAttributeTest.java
Wed Apr 30 17:06:41 2008
@@ -1299,10 +1299,10 @@
         assertEquals( "    test: (null)\n", attr1.toString() );
         
         attr1.add( "a" );
-        assertEquals( "    test: 'a'\n", attr1.toString() );
+        assertEquals( "    test: a\n", attr1.toString() );
         
         attr1.add( "b" );
-        assertEquals( "    test: 'a'\n    test: 'b'\n", attr1.toString() );
+        assertEquals( "    test: a\n    test: b\n", attr1.toString() );
 
         EntryAttribute attr2 = new DefaultClientAttribute( "test" );
 

Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntryTest.java?rev=652410&r1=652409&r2=652410&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntryTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntryTest.java
Wed Apr 30 17:06:41 2008
@@ -1146,8 +1146,8 @@
         String expected = 
             "ClientEntry\n" +
             "    dn: dc=example,dc=com\n" +
-            "    ObjectClass: 'top'\n" +
-            "    ObjectClass: 'person'\n" +
+            "    ObjectClass: top\n" +
+            "    ObjectClass: person\n" +
             "    ObjectClass: ''\n" +
             "    UserPassword: '0x61 0x62 '\n" +
             "    UserPassword: '0x62 '\n" +

Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterNodeEqualityTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterNodeEqualityTest.java?rev=652410&r1=652409&r2=652410&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterNodeEqualityTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterNodeEqualityTest.java
Wed Apr 30 17:06:41 2008
@@ -20,6 +20,8 @@
 package org.apache.directory.shared.ldap.filter;
 
 
+import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+
 import junit.framework.TestCase;
 
 
@@ -29,99 +31,92 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 575783 $
  */
-public class FilterNodeEqualityTest extends TestCase 
+public class FilterNodeEqualityTest extends TestCase
 {
-	public void testEqualityEquals()
-	{
-		EqualityNode eqNode1 = new EqualityNode( "attr1", "test" ); 
-		EqualityNode eqNode2 = new EqualityNode( "attr1", "test" );
-		
-		assertEquals( "two exact nodes should be equal", eqNode1, eqNode2 );
-		
-		eqNode2 = new EqualityNode( "attr2", "test" );
-		assertFalse( "different attribute in node should return false on equals()", 
-				eqNode1.equals( eqNode2 ) );
-		
-		eqNode2 = new EqualityNode( "attr2", "foobar" );
-		assertFalse( "different value in node should return false on equals()", 
-				eqNode1.equals( eqNode2 ) );
-		
-		PresenceNode presenceNode = new PresenceNode( "attr1" );
-		assertFalse( "two different leaf nodes should not be equal", eqNode1.equals( presenceNode
) );
-		assertFalse( "two different leaf nodes should not be equal", presenceNode.equals( eqNode1
) );
-		
-		GreaterEqNode greaterEqNode = new GreaterEqNode ( "attr1", "test" );
-		assertFalse( "two different simple nodes should not be equal", eqNode1.equals( greaterEqNode
) );
-		assertFalse( "two different simple nodes should not be equal", greaterEqNode.equals( eqNode1
) );
-	}
-
-
-	public void testGreaterEqEquals()
-	{
-		GreaterEqNode greaterEqNode1 = new GreaterEqNode( "attr1", "test" ); 
-		GreaterEqNode greaterEqNode2 = new GreaterEqNode( "attr1", "test" );
-		
-		assertEquals( "two exact nodes should be equal", greaterEqNode1, greaterEqNode2 );
-		
-		greaterEqNode2 = new GreaterEqNode( "attr2", "test" );
-		assertFalse( "different attribute in node should return false on equals()", 
-				greaterEqNode1.equals( greaterEqNode2 ) );
-		
-		greaterEqNode2 = new GreaterEqNode( "attr2", "foobar" );
-		assertFalse( "different value in node should return false on equals()", 
-				greaterEqNode1.equals( greaterEqNode2 ) );
-	}
-
-
-	public void testLessEqEquals()
-	{
-		LessEqNode lessEqNode1 = new LessEqNode( "attr1", "test" ); 
-		LessEqNode lessEqNode2 = new LessEqNode( "attr1", "test" );
-		
-		assertEquals( "two exact nodes should be equal", lessEqNode1, lessEqNode2 );
-		
-		lessEqNode2 = new LessEqNode( "attr2", "test" );
-		assertFalse( "different attribute in node should return false on equals()", 
-				lessEqNode1.equals( lessEqNode2 ) );
-		
-		lessEqNode2 = new LessEqNode( "attr2", "foobar" );
-		assertFalse( "different value in node should return false on equals()", 
-				lessEqNode1.equals( lessEqNode2 ) );
-	}
-
-
-	public void testApproximateEqEquals()
-	{
-		ApproximateNode approximateNode1 = new ApproximateNode( "attr1", "test" ); 
-		ApproximateNode approximateNode2 = new ApproximateNode( "attr1", "test" );
-		
-		assertEquals( "two exact nodes should be equal", approximateNode1, approximateNode2 );
-		
-		approximateNode2 = new ApproximateNode( "attr2", "test" );
-		assertFalse( "different attribute in node should return false on equals()", 
-				approximateNode1.equals( approximateNode2 ) );
-		
-		approximateNode2 = new ApproximateNode( "attr2", "foobar" );
-		assertFalse( "different value in node should return false on equals()", 
-				approximateNode1.equals( approximateNode2 ) );
-	}
-	
-	
-	public void testPresenceEquals()
-	{
-		PresenceNode presenceNode1 = new PresenceNode( "attr1" );
-		PresenceNode presenceNode2 = new PresenceNode( "attr1" );
-		
-		assertEquals( "two exact presence nodes on same attribute should be equal", 
-				presenceNode1, presenceNode2 );
-		
-		presenceNode2 = new PresenceNode( "attr2" );
-		assertFalse( "presence nodes on different attributes should not be equal", 
-				presenceNode1.equals( presenceNode2 ) );
-	}
-	
-	
-	public void testSubstringEquals()
-	{
-	}
+    public void testEqualityEquals()
+    {
+        EqualityNode eqNode1 = new EqualityNode( "attr1", new ClientStringValue( "test" )
);
+        EqualityNode eqNode2 = new EqualityNode( "attr1", new ClientStringValue( "test" )
);
+
+        assertEquals( "two exact nodes should be equal", eqNode1, eqNode2 );
+
+        eqNode2 = new EqualityNode( "attr2", new ClientStringValue( "test" ) );
+        assertFalse( "different attribute in node should return false on equals()", eqNode1.equals(
eqNode2 ) );
+
+        eqNode2 = new EqualityNode( "attr2", new ClientStringValue( "foobar" ) );
+        assertFalse( "different value in node should return false on equals()", eqNode1.equals(
eqNode2 ) );
+
+        PresenceNode presenceNode = new PresenceNode( "attr1" );
+        assertFalse( "two different leaf nodes should not be equal", eqNode1.equals( presenceNode
) );
+        assertFalse( "two different leaf nodes should not be equal", presenceNode.equals(
eqNode1 ) );
+
+        GreaterEqNode greaterEqNode = new GreaterEqNode( "attr1", new ClientStringValue(
"test" ) );
+        assertFalse( "two different simple nodes should not be equal", eqNode1.equals( greaterEqNode
) );
+        assertFalse( "two different simple nodes should not be equal", greaterEqNode.equals(
eqNode1 ) );
+    }
+
+
+    public void testGreaterEqEquals()
+    {
+        GreaterEqNode greaterEqNode1 = new GreaterEqNode( "attr1", new ClientStringValue(
"test" ) );
+        GreaterEqNode greaterEqNode2 = new GreaterEqNode( "attr1", new ClientStringValue(
"test" ) );
+
+        assertEquals( "two exact nodes should be equal", greaterEqNode1, greaterEqNode2 );
+
+        greaterEqNode2 = new GreaterEqNode( "attr2", new ClientStringValue( "test" ) );
+        assertFalse( "different attribute in node should return false on equals()", greaterEqNode1
+            .equals( greaterEqNode2 ) );
+
+        greaterEqNode2 = new GreaterEqNode( "attr2", new ClientStringValue( "foobar" ) );
+        assertFalse( "different value in node should return false on equals()", greaterEqNode1.equals(
greaterEqNode2 ) );
+    }
+
+
+    public void testLessEqEquals()
+    {
+        LessEqNode lessEqNode1 = new LessEqNode( "attr1", new ClientStringValue( "test" )
);
+        LessEqNode lessEqNode2 = new LessEqNode( "attr1", new ClientStringValue( "test" )
);
+
+        assertEquals( "two exact nodes should be equal", lessEqNode1, lessEqNode2 );
+
+        lessEqNode2 = new LessEqNode( "attr2", new ClientStringValue( "test" ) );
+        assertFalse( "different attribute in node should return false on equals()", lessEqNode1.equals(
lessEqNode2 ) );
+
+        lessEqNode2 = new LessEqNode( "attr2", new ClientStringValue( "foobar" ) );
+        assertFalse( "different value in node should return false on equals()", lessEqNode1.equals(
lessEqNode2 ) );
+    }
+
+
+    public void testApproximateEqEquals()
+    {
+        ApproximateNode approximateNode1 = new ApproximateNode( "attr1", new ClientStringValue(
"test" ) );
+        ApproximateNode approximateNode2 = new ApproximateNode( "attr1", new ClientStringValue(
"test" ) );
+
+        assertEquals( "two exact nodes should be equal", approximateNode1, approximateNode2
);
+
+        approximateNode2 = new ApproximateNode( "attr2", new ClientStringValue( "test" )
);
+        assertFalse( "different attribute in node should return false on equals()", approximateNode1
+            .equals( approximateNode2 ) );
+
+        approximateNode2 = new ApproximateNode( "attr2", new ClientStringValue( "foobar"
) );
+        assertFalse( "different value in node should return false on equals()", approximateNode1
+            .equals( approximateNode2 ) );
+    }
+
+
+    public void testPresenceEquals()
+    {
+        PresenceNode presenceNode1 = new PresenceNode( "attr1" );
+        PresenceNode presenceNode2 = new PresenceNode( "attr1" );
+
+        assertEquals( "two exact presence nodes on same attribute should be equal", presenceNode1,
presenceNode2 );
+
+        presenceNode2 = new PresenceNode( "attr2" );
+        assertFalse( "presence nodes on different attributes should not be equal", presenceNode1.equals(
presenceNode2 ) );
+    }
+
+
+    public void testSubstringEquals()
+    {
+    }
 }

Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java?rev=652410&r1=652409&r2=652410&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
Wed Apr 30 17:06:41 2008
@@ -83,7 +83,7 @@
     {
         SimpleNode node = ( SimpleNode ) FilterParser.parse( "(ou~=people)" );
         assertEquals( "ou", node.getAttribute() );
-        assertEquals( "people", node.getValue() );
+        assertEquals( "people", node.getValue().get() );
         assertTrue( node instanceof ApproximateNode );
     }
 
@@ -138,7 +138,7 @@
     {
         SimpleNode node = ( SimpleNode ) FilterParser.parse( "(ou;lang-de>=\\23\\42asdl
fkajsd)" );
         assertEquals( "ou;lang-de", node.getAttribute() );
-        assertEquals( "\\23\\42asdl fkajsd", node.getValue() );
+        assertEquals( "\\23\\42asdl fkajsd", node.getValue().get() );
     }
 
 
@@ -147,7 +147,7 @@
     {
         SimpleNode node = ( SimpleNode ) FilterParser.parse( "(ou;lang-de;version-124>=\\23\\42asdl
fkajsd)" );
         assertEquals( "ou;lang-de;version-124", node.getAttribute() );
-        assertEquals( "\\23\\42asdl fkajsd", node.getValue() );
+        assertEquals( "\\23\\42asdl fkajsd", node.getValue().get() );
     }
 
 
@@ -156,7 +156,7 @@
     {
         SimpleNode node = ( SimpleNode ) FilterParser.parse( "(1.3.4.2;lang-de;version-124>=\\23\\42asdl
fkajsd)" );
         assertEquals( "1.3.4.2;lang-de;version-124", node.getAttribute() );
-        assertEquals( "\\23\\42asdl fkajsd", node.getValue() );
+        assertEquals( "\\23\\42asdl fkajsd", node.getValue().get() );
     }
 
 
@@ -183,7 +183,7 @@
     {
         SimpleNode node = ( SimpleNode ) FilterParser.parse( "(ou=people)" );
         assertEquals( "ou", node.getAttribute() );
-        assertEquals( "people", node.getValue() );
+        assertEquals( "people", node.getValue().get() );
         assertTrue( node instanceof EqualityNode );
     }
 
@@ -210,7 +210,7 @@
     {
         SimpleNode node = ( SimpleNode ) FilterParser.parse( "(ou=people/in/my/company)"
);
         assertEquals( "ou", node.getAttribute() );
-        assertEquals( "people/in/my/company", node.getValue() );
+        assertEquals( "people/in/my/company", node.getValue().get() );
         assertTrue( node instanceof EqualityNode );
     }
 
@@ -638,7 +638,7 @@
     {
         SimpleNode node = ( SimpleNode ) FilterParser.parse( "(ou=)" );
         assertEquals( "ou", node.getAttribute() );
-        assertEquals( "", node.getValue() );
+        assertEquals( "", node.getValue().get() );
         assertTrue( node instanceof EqualityNode );
     }
 

Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java?rev=652410&r1=652409&r2=652410&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
Wed Apr 30 17:06:41 2008
@@ -1271,7 +1271,7 @@
            dn.get( 4 );
            fail();
        }
-       catch ( ArrayIndexOutOfBoundsException aioob )
+       catch ( IndexOutOfBoundsException aioob )
        {
            assertTrue( true );
        }

Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java?rev=652410&r1=652409&r2=652410&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java
Wed Apr 30 17:06:41 2008
@@ -27,6 +27,7 @@
 
 import junit.framework.TestCase;
 
+import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
 import org.apache.directory.shared.ldap.filter.AndNode;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
@@ -276,16 +277,16 @@
     {
         SubtreeSpecification ss = parser.parse( SPEC_WITH_REFINEMENT );
 
-        SimpleNode n1 = new EqualityNode( "objectClass", "1.2.3" );
-        SimpleNode n2 = new EqualityNode( "objectClass", "4.5.6" );
-        SimpleNode n3 = new EqualityNode( "objectClass", "person-7" );
+        SimpleNode n1 = new EqualityNode( "objectClass", new ClientStringValue( "1.2.3" )
);
+        SimpleNode n2 = new EqualityNode( "objectClass", new ClientStringValue( "4.5.6" )
);
+        SimpleNode n3 = new EqualityNode( "objectClass", new ClientStringValue( "person-7"
) );
         BranchNode n4 = new OrNode();
         n4.addNode( n2 );
         n4.addNode( n3 );
         BranchNode n5 = new AndNode();
         n5.addNode( n1 );
         n5.addNode( n4 );
-        SimpleNode n6 = new EqualityNode( "objectClass", "10.11.12" );
+        SimpleNode n6 = new EqualityNode( "objectClass", new ClientStringValue( "10.11.12"
) );
         BranchNode n7 = new NotNode();
         n7.addNode( n6 );
         BranchNode n8 = new AndNode();



Mime
View raw message