You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2010/01/27 17:16:18 UTC
svn commit: r903709 [2/2] - in /directory:
apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/
shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/
shared/trunk/ldap/src/main/java/org/apache/directo...
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java?rev=903709&r1=903708&r2=903709&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java Wed Jan 27 16:16:15 2010
@@ -20,6 +20,10 @@
package org.apache.directory.shared.ldap.codec.modifyDn;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.nio.ByteBuffer;
import java.util.List;
@@ -28,19 +32,14 @@
import org.apache.directory.shared.asn1.codec.DecoderException;
import org.apache.directory.shared.asn1.codec.EncoderException;
import org.apache.directory.shared.ldap.codec.ControlCodec;
-import org.apache.directory.shared.ldap.codec.LdapDecoder;
import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
import org.apache.directory.shared.ldap.codec.ResponseCarryingException;
-import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNRequestCodec;
import org.apache.directory.shared.ldap.message.InternalMessage;
import org.apache.directory.shared.ldap.message.ModifyDnResponseImpl;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.util.StringTools;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
/**
@@ -56,7 +55,7 @@
@Test
public void testDecodeModifyDNRequestSuccess()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x48 );
@@ -130,7 +129,7 @@
@Test
public void testDecodeModifyDNRequestBadDN()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x48 );
@@ -181,7 +180,7 @@
@Test
public void testDecodeModifyDNRequestBadRDN()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x48 );
@@ -232,7 +231,7 @@
@Test
public void testDecodeModifyDNRequestBadNewSuperior()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x48 );
@@ -283,7 +282,7 @@
@Test
public void testDecodeModifyDNRequestSuccessWithControls()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x65 );
@@ -370,7 +369,7 @@
@Test
public void testDecodeModifyDNRequestWithoutSuperior()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x3D );
@@ -442,7 +441,7 @@
@Test
public void testDecodeModifyDNRequestWithoutSuperiorWithControls()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x5A );
@@ -528,7 +527,7 @@
@Test
public void testDecodeModifyDNRequestEmptyBody()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x07 );
@@ -564,7 +563,7 @@
@Test
public void testDecodeModifyDNRequestEmptyEntry()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x09 );
@@ -600,7 +599,7 @@
@Test
public void testDecodeModifyDNRequestEmptyNewRdn()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x2D );
@@ -640,7 +639,7 @@
@Test
public void testDecodeModifyDNRequestEmptyDeleteOldRdnn()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x3C );
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java?rev=903709&r1=903708&r2=903709&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java Wed Jan 27 16:16:15 2010
@@ -20,6 +20,10 @@
package org.apache.directory.shared.ldap.codec.modifyDn;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.nio.ByteBuffer;
import java.util.List;
@@ -28,16 +32,11 @@
import org.apache.directory.shared.asn1.codec.DecoderException;
import org.apache.directory.shared.asn1.codec.EncoderException;
import org.apache.directory.shared.ldap.codec.ControlCodec;
-import org.apache.directory.shared.ldap.codec.LdapDecoder;
import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponseCodec;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.util.StringTools;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
/**
@@ -53,7 +52,7 @@
@Test
public void testDecodeModifyResponseSuccess()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x0E );
@@ -125,7 +124,7 @@
@Test
public void testDecodeModifyResponseSuccessWithControls()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x2B );
@@ -208,7 +207,7 @@
@Test
public void testDecodeModifyDNResponseEmptyResult()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x07 );
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java?rev=903709&r1=903708&r2=903709&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java Wed Jan 27 16:16:15 2010
@@ -20,6 +20,13 @@
package org.apache.directory.shared.ldap.codec.search;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.List;
@@ -30,11 +37,8 @@
import org.apache.directory.shared.asn1.codec.DecoderException;
import org.apache.directory.shared.asn1.codec.EncoderException;
import org.apache.directory.shared.ldap.codec.LdapConstants;
-import org.apache.directory.shared.ldap.codec.LdapDecoder;
import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.search.ExtensibleMatchFilter;
-import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.filter.SearchScope;
@@ -43,12 +47,6 @@
import org.apache.directory.shared.ldap.util.StringTools;
import org.junit.BeforeClass;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
/**
@@ -94,7 +92,7 @@
@Test
public void testDecodeSearchRequestExtensibleMatch()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x63 );
stream.put( new byte[]
@@ -215,7 +213,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -265,7 +263,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -315,7 +313,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -366,7 +364,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -439,7 +437,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -506,7 +504,7 @@
0x04, 0x05, 'a', 't', 't', 'r', '2'
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -555,7 +553,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -604,7 +602,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -654,7 +652,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java?rev=903709&r1=903708&r2=903709&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestSubstringTest.java Wed Jan 27 16:16:15 2010
@@ -20,6 +20,11 @@
package org.apache.directory.shared.ldap.codec.search;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.List;
@@ -31,11 +36,8 @@
import org.apache.directory.shared.asn1.codec.EncoderException;
import org.apache.directory.shared.ldap.codec.ControlCodec;
import org.apache.directory.shared.ldap.codec.LdapConstants;
-import org.apache.directory.shared.ldap.codec.LdapDecoder;
import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
-import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.filter.SearchScope;
@@ -44,10 +46,6 @@
import org.apache.directory.shared.ldap.util.StringTools;
import org.junit.BeforeClass;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertNotNull;
/**
@@ -95,7 +93,7 @@
@Test
public void testDecodeSearchRequestSubstringInitialAny()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x64 );
stream.put( new byte[]
@@ -212,7 +210,7 @@
@Test
public void testDecodeSearchRequestSubstringInitialAnyWithControls()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x0081 );
stream.put( new byte[]
@@ -338,7 +336,7 @@
@Test
public void testDecodeSearchRequestSubstringAny()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x64 );
stream.put( new byte[]
@@ -455,7 +453,7 @@
@Test
public void testDecodeSearchRequestSubstringAnyFinal()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x67 );
stream.put( new byte[]
@@ -573,7 +571,7 @@
@Test
public void testDecodeSearchRequestSubstringInitialAnyFinal()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x6A );
stream.put( new byte[]
@@ -692,7 +690,7 @@
@Test
public void testDecodeSearchRequestSubstringInitialAnyAnyFinal()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x67 );
stream.put( new byte[]
@@ -809,7 +807,7 @@
@Test
public void testDecodeSearchRequestSubstringAnyAnyFinal()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x6A );
stream.put( new byte[]
@@ -923,7 +921,7 @@
@Test
public void testDecodeSearchRequestSubstringInitialAnyAny()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x67 );
stream.put( new byte[]
@@ -1040,7 +1038,7 @@
@Test
public void testDecodeSearchRequestSubstringAnyAnyAny()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x6A );
stream.put( new byte[]
@@ -1161,7 +1159,7 @@
@Test
public void testDecodeSearchRequestSubstringFinal()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x67 );
stream.put( new byte[]
@@ -1296,7 +1294,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1346,7 +1344,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1396,7 +1394,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1447,7 +1445,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1499,7 +1497,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1551,7 +1549,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1603,7 +1601,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1647,7 +1645,7 @@
// AttributeDescription
0x04, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1691,7 +1689,7 @@
// AttributeDescription
0x04, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1735,7 +1733,7 @@
// AttributeDescription
0x04, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1778,7 +1776,7 @@
// AttributeDescription
0x04, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1821,7 +1819,7 @@
// AttributeDescription
0x04, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java?rev=903709&r1=903708&r2=903709&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java Wed Jan 27 16:16:15 2010
@@ -20,6 +20,11 @@
package org.apache.directory.shared.ldap.codec.search;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.HashSet;
@@ -35,32 +40,21 @@
import org.apache.directory.shared.ldap.codec.AttributeValueAssertion;
import org.apache.directory.shared.ldap.codec.ControlCodec;
import org.apache.directory.shared.ldap.codec.LdapConstants;
-import org.apache.directory.shared.ldap.codec.LdapDecoder;
import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
import org.apache.directory.shared.ldap.codec.ResponseCarryingException;
-import org.apache.directory.shared.ldap.codec.search.AndFilter;
-import org.apache.directory.shared.ldap.codec.search.AttributeValueAssertionFilter;
-import org.apache.directory.shared.ldap.codec.search.NotFilter;
-import org.apache.directory.shared.ldap.codec.search.OrFilter;
-import org.apache.directory.shared.ldap.codec.search.PresentFilter;
-import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
import org.apache.directory.shared.ldap.codec.search.controls.subEntry.SubEntryControlCodec;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.message.InternalMessage;
-import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.filter.SearchScope;
+import org.apache.directory.shared.ldap.message.InternalMessage;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.message.SearchResponseDoneImpl;
import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimToLowerNormalizer;
import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
import org.apache.directory.shared.ldap.util.StringTools;
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
/**
@@ -108,7 +102,7 @@
@Test
public void testDecodeSearchRequestGlobalNoControls()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x90 );
stream.put( new byte[]
@@ -274,7 +268,7 @@
@Test
public void testDecodeSearchRequestCompareFiltersNoControls()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x90 );
stream.put( new byte[]
@@ -443,7 +437,7 @@
@Test
public void testDecodeSearchRequestPresentNoControls()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x7B );
stream.put( new byte[]
@@ -610,7 +604,7 @@
@Test
public void testDecodeSearchRequestNoAttributes()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x40 );
stream.put( new byte[]
@@ -710,7 +704,7 @@
@Test
public void testDecodeSearchRequestOneEmptyAttribute()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x3F );
stream.put( new byte[]
@@ -793,7 +787,7 @@
@Test
public void testDecodeSearchRequestWithStarAndAttr()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x40 );
stream.put( new byte[]
@@ -887,7 +881,7 @@
@Test
public void testDecodeSearchRequestOrFilters()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x96 );
stream.put( new byte[]
@@ -1072,7 +1066,7 @@
'1', '3', '7', '3', '0', '.', '3', '.', '4', '.', '2',
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1142,7 +1136,7 @@
@Test
public void testDecodeSearchRequestGlobalNoControlsOidAndAlias()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0xA1 );
stream.put( new byte[]
@@ -1331,7 +1325,7 @@
0x01, 0x01, ( byte ) 0xFF // SubEntry visibility
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1400,7 +1394,7 @@
{ 0x30, 0x05, 0x02, 0x01, 0x04, // messageID
0x63, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1438,7 +1432,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1468,7 +1462,7 @@
@Test
public void testDecodeSearchRequestEmptyBaseDnNoControls()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x6F );
stream.put( new byte[]
@@ -1629,7 +1623,7 @@
@Test
public void testDecodeSearchRequestGlobalBadObjectBase()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x90 );
stream.put( new byte[]
@@ -1723,7 +1717,7 @@
0x0A, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1752,7 +1746,7 @@
@Test
public void testDecodeSearchRequestGlobalBadScope()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x90 );
stream.put( new byte[]
@@ -1838,7 +1832,7 @@
'u', 'i', 'd', '=', 'a', 'k', 'a', 'r', 'a', 's', 'u', 'l', 'u', ',', 'd', 'c', '=', 'e', 'x', 'a',
'm', 'p', 'l', 'e', ',', 'd', 'c', '=', 'c', 'o', 'm', 0x0A, 0x01, 0x00, 0x0A, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1867,7 +1861,7 @@
@Test
public void testDecodeSearchRequestGlobalBadDerefAlias()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x90 );
stream.put( new byte[]
@@ -1954,7 +1948,7 @@
'u', 'i', 'd', '=', 'a', 'k', 'a', 'r', 'a', 's', 'u', 'l', 'u', ',', 'd', 'c', '=', 'e', 'x', 'a',
'm', 'p', 'l', 'e', ',', 'd', 'c', '=', 'c', 'o', 'm', 0x0A, 0x01, 0x00, 0x0A, 0x01, 0x00, 0x02, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -1983,7 +1977,7 @@
@Test
public void testDecodeSearchRequestGlobalBadSizeLimit()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x8F );
stream.put( new byte[]
@@ -2070,7 +2064,7 @@
'm', 'p', 'l', 'e', ',', 'd', 'c', '=', 'c', 'o', 'm', 0x0A, 0x01, 0x00, 0x0A, 0x01, 0x00, 0x02, 0x01,
0x00, 0x02, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2099,7 +2093,7 @@
@Test
public void testDecodeSearchRequestGlobalBadTimeLimit()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x8F );
stream.put( new byte[]
@@ -2193,7 +2187,7 @@
0x01, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2230,7 +2224,7 @@
'm', 'p', 'l', 'e', ',', 'd', 'c', '=', 'c', 'o', 'm', 0x0A, 0x01, 0x00, 0x0A, 0x01, 0x00, 0x02, 0x01,
0x00, 0x02, 0x01, 0x00, 0x01, 0x01, ( byte ) 0xFF, ( byte ) 0xA0, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2277,7 +2271,7 @@
0x01, 0x01, ( byte ) 0xFF,
( byte ) 0x87, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2314,7 +2308,7 @@
'm', 'p', 'l', 'e', ',', 'd', 'c', '=', 'c', 'o', 'm', 0x0A, 0x01, 0x00, 0x0A, 0x01, 0x00, 0x02, 0x01,
0x00, 0x02, 0x01, 0x00, 0x01, 0x01, ( byte ) 0xFF, ( byte ) 0xA3, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2351,7 +2345,7 @@
'm', 'p', 'l', 'e', ',', 'd', 'c', '=', 'c', 'o', 'm', 0x0A, 0x01, 0x00, 0x0A, 0x01, 0x00, 0x02, 0x01,
0x00, 0x02, 0x01, 0x00, 0x01, 0x01, ( byte ) 0xFF, ( byte ) 0xA5, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2388,7 +2382,7 @@
'm', 'p', 'l', 'e', ',', 'd', 'c', '=', 'c', 'o', 'm', 0x0A, 0x01, 0x00, 0x0A, 0x01, 0x00, 0x02, 0x01,
0x00, 0x02, 0x01, 0x00, 0x01, 0x01, ( byte ) 0xFF, ( byte ) 0xA6, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2425,7 +2419,7 @@
'm', 'p', 'l', 'e', ',', 'd', 'c', '=', 'c', 'o', 'm', 0x0A, 0x01, 0x00, 0x0A, 0x01, 0x00, 0x02, 0x01,
0x00, 0x02, 0x01, 0x00, 0x01, 0x01, ( byte ) 0xFF, ( byte ) 0xA8, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2472,7 +2466,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2525,7 +2519,7 @@
// OF AttributeDescription
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2608,7 +2602,7 @@
// OF AttributeDescription
0x04, 0x01, '*' };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2704,7 +2698,7 @@
0x04, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2770,7 +2764,7 @@
// AttributeDescription
0x04, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2812,7 +2806,7 @@
// AttributeDescription
0x04, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2854,7 +2848,7 @@
// AttributeDescription
0x04, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2895,7 +2889,7 @@
// AttributeDescription
0x04, 0x00 };
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -2953,7 +2947,7 @@
0x30, 0x00
};
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( asn1BER.length );
stream.put( asn1BER );
@@ -3036,7 +3030,7 @@
@Test
public void testDecodeSearchRequestEq()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x25 );
stream.put( new byte[]
@@ -3137,7 +3131,7 @@
@Test
public void testDecodeSearchRequestAndEq()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x27 );
stream.put( new byte[]
@@ -3246,7 +3240,7 @@
@Test
public void testDecodeSearchRequestAndEqEq()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x2F );
stream.put( new byte[]
@@ -3370,7 +3364,7 @@
@Test
public void testDecodeSearchRequestAndAndEq()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x29 );
stream.put( new byte[]
@@ -3485,7 +3479,7 @@
@Test
public void testDecodeSearchRequestAndAndEqEq()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x31 );
stream.put( new byte[]
@@ -3616,7 +3610,7 @@
@Test
public void testDecodeSearchRequestAnd_AndEq_Eq()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x31 );
stream.put( new byte[]
@@ -3747,7 +3741,7 @@
@Test
public void testDecodeSearchRequestAnd_AndEqEq_Eq()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x39 );
stream.put( new byte[]
@@ -3894,7 +3888,7 @@
@Test
public void testDecodeSearchRequestAndEq_OrEqEq()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x39 );
stream.put( new byte[]
@@ -4039,7 +4033,7 @@
@Test
public void testDecodeSearchRequestAnd_AndEq_AndEq()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x33 );
stream.put( new byte[]
@@ -4177,7 +4171,7 @@
@Test
public void testDecodeSearchRequestAnd_AndEqEq_AndEq()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x3B );
stream.put( new byte[]
@@ -4329,7 +4323,7 @@
@Test
public void testDecodeSearchRequestAnd_OrPrPr_NotGEq()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x3B );
stream.put( new byte[]
@@ -4467,7 +4461,7 @@
@Test
public void testDecodeSearchRequestRootDSE()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x33 );
stream.put( new byte[]
@@ -4529,7 +4523,7 @@
@Test
public void testDecodeSearchRequestDIRSERVER_810()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x6B );
stream.put( new byte[]
@@ -4625,7 +4619,7 @@
@Test
public void testDecodeSearchRequestComplexFilter()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x77 );
stream.put( new byte[]
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java?rev=903709&r1=903708&r2=903709&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneTest.java Wed Jan 27 16:16:15 2010
@@ -20,6 +20,10 @@
package org.apache.directory.shared.ldap.codec.search;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.nio.ByteBuffer;
import java.util.List;
@@ -28,16 +32,11 @@
import org.apache.directory.shared.asn1.codec.DecoderException;
import org.apache.directory.shared.asn1.codec.EncoderException;
import org.apache.directory.shared.ldap.codec.ControlCodec;
-import org.apache.directory.shared.ldap.codec.LdapDecoder;
import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.search.SearchResultDoneCodec;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.util.StringTools;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
/**
@@ -54,7 +53,7 @@
@Test
public void testDecodeSearchResultDoneSuccess()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x0E );
@@ -123,7 +122,7 @@
@Test
public void testDecodeSearchResultDoneSuccessWithControls()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x2B );
@@ -205,7 +204,7 @@
@Test
public void testDecodeSearchResultDoneEmptyResult()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x07 );
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java?rev=903709&r1=903708&r2=903709&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java Wed Jan 27 16:16:15 2010
@@ -20,6 +20,10 @@
package org.apache.directory.shared.ldap.codec.search;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.nio.ByteBuffer;
import java.util.List;
@@ -30,17 +34,12 @@
import org.apache.directory.shared.asn1.codec.DecoderException;
import org.apache.directory.shared.asn1.codec.EncoderException;
import org.apache.directory.shared.ldap.codec.ControlCodec;
-import org.apache.directory.shared.ldap.codec.LdapDecoder;
import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.search.SearchResultEntryCodec;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.util.StringTools;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
/**
@@ -56,7 +55,7 @@
@Test
public void testDecodeSearchResultEntrySuccess() throws NamingException
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x50 );
@@ -145,7 +144,7 @@
@Test
public void testDecodeSearchResultEntry2AttrsSuccess() throws NamingException
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x7b );
@@ -243,7 +242,7 @@
@Test
public void testDecodeSearchResultEntrySuccessWithFollowingMessage() throws NamingException
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x66 );
@@ -353,7 +352,7 @@
@Test
public void testDecodeSearchResultEntryEmpty()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x07 );
@@ -391,7 +390,7 @@
@Test
public void testDecodeSearchResultEntryEmptyObjectName()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x09 );
@@ -431,7 +430,7 @@
@Test
public void testDecodeSearchResultEntryObjectNameAlone()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x24 );
@@ -472,7 +471,7 @@
@Test
public void testDecodeSearchResultEntryEmptyAttributes()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x26 );
@@ -541,7 +540,7 @@
@Test
public void testDecodeSearchResultEntryEmptyAttributeList()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x28 );
@@ -584,7 +583,7 @@
@Test
public void testDecodeSearchResultEntryEmptyAttributeListWithControls()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x45 );
@@ -634,7 +633,7 @@
@Test
public void testDecodeSearchResultEntryEmptyType()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x2A );
@@ -680,7 +679,7 @@
@Test
public void testDecodeSearchResultEntryTypeAlone()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x35 );
@@ -726,7 +725,7 @@
@Test
public void testDecodeSearchResultEntryEmptyVals() throws NamingException
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x37 );
@@ -807,7 +806,7 @@
@Test
public void testDecodeSearchResultEntryEmptyVals2() throws NamingException
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x48 );
@@ -890,7 +889,7 @@
@Test
public void testDecodeSearchResultEntryEmptyValsWithControls() throws NamingException
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x54 );
@@ -984,7 +983,7 @@
@Test
public void testDecodeSearchResultEntryEmptyAttributeValue() throws NamingException
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x39 );
@@ -1069,7 +1068,7 @@
@Test
public void testDecodeSearchResultEntryEmptyAttributeValueWithControls() throws NamingException
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x56 );
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java?rev=903709&r1=903708&r2=903709&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceTest.java Wed Jan 27 16:16:15 2010
@@ -20,6 +20,10 @@
package org.apache.directory.shared.ldap.codec.search;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.nio.ByteBuffer;
import java.util.HashSet;
import java.util.List;
@@ -30,17 +34,12 @@
import org.apache.directory.shared.asn1.codec.DecoderException;
import org.apache.directory.shared.asn1.codec.EncoderException;
import org.apache.directory.shared.ldap.codec.ControlCodec;
-import org.apache.directory.shared.ldap.codec.LdapDecoder;
import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.search.SearchResultReferenceCodec;
import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
import org.apache.directory.shared.ldap.util.LdapURL;
import org.apache.directory.shared.ldap.util.StringTools;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
/**
@@ -56,7 +55,7 @@
@Test
public void testDecodeSearchResultReferenceSuccess()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x3d8 );
@@ -176,7 +175,7 @@
@Test
public void testDecodeSearchResultReferenceSuccessWithControls()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x3F5 );
@@ -318,7 +317,7 @@
@Test
public void testDecodeSearchResultReferenceNoReference()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x07 );
@@ -358,7 +357,7 @@
@Test
public void testDecodeSearchResultReferenceOneReference()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x11 );
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java?rev=903709&r1=903708&r2=903709&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java Wed Jan 27 16:16:15 2010
@@ -20,6 +20,10 @@
package org.apache.directory.shared.ldap.codec.unbind;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.nio.ByteBuffer;
import java.util.List;
@@ -28,14 +32,10 @@
import org.apache.directory.shared.asn1.codec.DecoderException;
import org.apache.directory.shared.asn1.codec.EncoderException;
import org.apache.directory.shared.ldap.codec.ControlCodec;
-import org.apache.directory.shared.ldap.codec.LdapDecoder;
import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
import org.apache.directory.shared.ldap.util.StringTools;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
/**
@@ -49,7 +49,7 @@
@Test
public void testDecodeUnBindRequestNoControls()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x07 );
stream.put( new byte[]
@@ -105,7 +105,7 @@
@Test
public void testDecodeUnBindRequestWithControls()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x24 );
stream.put( new byte[]
@@ -175,7 +175,7 @@
@Test
public void testDecodeUnBindRequestNotNull()
{
- Asn1Decoder ldapDecoder = new LdapDecoder();
+ Asn1Decoder ldapDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.allocate( 0x09 );
stream.put( new byte[]