directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r810002 [3/3] - in /directory: apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/ apacheds/branches/apacheds-schema/kerberos-shared/src/test/java/org/apache/directory/server/kerberos...
Date Tue, 01 Sep 2009 12:28:03 GMT
Modified: directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java (original)
+++ directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java Tue Sep  1 12:28:00 2009
@@ -40,10 +40,14 @@
 import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
 import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 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;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
 
 /**
  * Tests for the Del Request parsing
@@ -56,6 +60,7 @@
     /**
      * Test parsing of a request without the dn attribute
      */
+    @Test
     public void testRequestWithoutDn()
     {
         testParsingFail( SearchRequestTest.class, "request_without_dn_attribute.xml" );
@@ -65,6 +70,7 @@
     /**
      * Test parsing of a request with the dn attribute
      */
+    @Test
     public void testRequestWithDn()
     {
         Dsmlv2Parser parser = null;
@@ -91,6 +97,7 @@
     /**
      * Test parsing of a request with the (optional) requestID attribute
      */
+    @Test
     public void testRequestWithRequestId()
     {
         Dsmlv2Parser parser = null;
@@ -117,6 +124,7 @@
     /**
      * Test parsing of a request with the (optional) requestID attribute equals to 0
      */
+    @Test
     public void testRequestWithRequestIdEquals0()
     {
         testParsingFail( SearchRequestTest.class, "request_with_requestID_equals_0.xml" );
@@ -126,6 +134,7 @@
     /**
      * Test parsing of a request with a (optional) Control element
      */
+    @Test
     public void testRequestWith1Control()
     {
         Dsmlv2Parser parser = null;
@@ -155,6 +164,7 @@
     /**
      * Test parsing of a request with a (optional) Control element with Base64 value
      */
+    @Test
     public void testRequestWith1ControlBase64Value()
     {
         Dsmlv2Parser parser = null;
@@ -185,6 +195,7 @@
     /**
      * Test parsing of a request with a (optional) Control element with empty value
      */
+    @Test
     public void testRequestWith1ControlEmptyValue()
     {
         Dsmlv2Parser parser = null;
@@ -215,6 +226,7 @@
     /**
      * Test parsing of a request with 2 (optional) Control elements
      */
+    @Test
     public void testRequestWith2Controls()
     {
         Dsmlv2Parser parser = null;
@@ -245,6 +257,7 @@
     /**
      * Test parsing of a request with 3 (optional) Control elements without value
      */
+    @Test
     public void testRequestWith3ControlsWithoutValue()
     {
         Dsmlv2Parser parser = null;
@@ -275,6 +288,7 @@
     /**
      * Test parsing of a request without the Filter element
      */
+    @Test
     public void testRequestWithoutFilter()
     {
         testParsingFail( SearchRequestTest.class, "request_without_filter.xml" );
@@ -284,6 +298,7 @@
     /**
      * Test parsing of a request without scope attribute
      */
+    @Test
     public void testRequestWithoutScopeAttribute()
     {
         testParsingFail( SearchRequestTest.class, "request_without_scope_attribute.xml" );
@@ -294,6 +309,7 @@
      * Test parsing of a request with scope attribute to BaseObject value
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithScopeBaseObject()
     {
         Dsmlv2Parser parser = null;
@@ -321,6 +337,7 @@
      * Test parsing of a request with scope attribute to SingleLevel value
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithScopeSingleLevel()
     {
         Dsmlv2Parser parser = null;
@@ -348,6 +365,7 @@
      * Test parsing of a request with scope attribute to WholeSubtree value
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithScopeWholeSubtree()
     {
         Dsmlv2Parser parser = null;
@@ -374,6 +392,7 @@
     /**
      * Test parsing of a request with scope attribute to Error value
      */
+    @Test
     public void testRequestWithScopeError()
     {
         testParsingFail( SearchRequestTest.class, "request_with_scope_error.xml" );
@@ -383,6 +402,7 @@
     /**
      * Test parsing of a request without derefAliases attribute
      */
+    @Test
     public void testRequestWithoutDerefAliasesAttribute()
     {
         testParsingFail( SearchRequestTest.class, "request_without_derefAliases_attribute.xml" );
@@ -393,6 +413,7 @@
      * Test parsing of a request with derefAliases attribute to derefAlways value
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithDerefAliasesDerefAlways()
     {
         Dsmlv2Parser parser = null;
@@ -420,6 +441,7 @@
      * Test parsing of a request with derefAliases attribute to derefFindingBaseObj value
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithDerefAliasesDerefFindingBaseObj()
     {
         Dsmlv2Parser parser = null;
@@ -447,6 +469,7 @@
      * Test parsing of a request with derefAliases attribute to derefinSearching value
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithDerefAliasesDerefinSearching()
     {
         Dsmlv2Parser parser = null;
@@ -474,6 +497,7 @@
      * Test parsing of a request with derefAliases attribute to neverDerefAliases value
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithDerefAliasesNeverDerefAliases()
     {
         Dsmlv2Parser parser = null;
@@ -501,6 +525,7 @@
      * Test parsing of a request with derefAliases attribute to Error value
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithDerefAliasesError()
     {
         testParsingFail( SearchRequestTest.class, "request_with_derefAliases_error.xml" );
@@ -511,6 +536,7 @@
      * Test parsing of a request with the sizeLimit (optional) attribute
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithSizeLimitAttribute()
     {
         Dsmlv2Parser parser = null;
@@ -538,6 +564,7 @@
      * Test parsing of a request with sizeLimit attribute to Error value
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithSizeLimitError()
     {
         testParsingFail( SearchRequestTest.class, "request_with_sizeLimit_error.xml" );
@@ -548,6 +575,7 @@
      * Test parsing of a request with the timeLimit (optional) attribute
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithTimeLimitAttribute()
     {
         Dsmlv2Parser parser = null;
@@ -575,6 +603,7 @@
      * Test parsing of a request with timeLimit attribute to Error value
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithTimeLimitError()
     {
         testParsingFail( SearchRequestTest.class, "request_with_timeLimit_error.xml" );
@@ -584,6 +613,7 @@
     /**
      * Test parsing of a request with typesOnly to true
      */
+    @Test
     public void testRequestWithTypesOnlyTrue()
     {
         Dsmlv2Parser parser = null;
@@ -610,6 +640,7 @@
     /**
      * Test parsing of a request with typesOnly to 1
      */
+    @Test
     public void testRequestWithTypesOnly1()
     {
         Dsmlv2Parser parser = null;
@@ -636,6 +667,7 @@
     /**
      * Test parsing of a request with typesOnly to false
      */
+    @Test
     public void testRequestWithTypesOnlyFalse()
     {
         Dsmlv2Parser parser = null;
@@ -662,6 +694,7 @@
     /**
      * Test parsing of a request with typesOnly to 0
      */
+    @Test
     public void testRequestWithTypesOnlyRdn0()
     {
         Dsmlv2Parser parser = null;
@@ -688,6 +721,7 @@
     /**
      * Test parsing of a request with typesOnly to an error value
      */
+    @Test
     public void testRequestWithTypesOnlyError()
     {
         testParsingFail( SearchRequestTest.class, "request_with_typesOnly_error.xml" );
@@ -697,6 +731,7 @@
     /**
      * Test parsing of a request with 2 Filter elements
      */
+    @Test
     public void testRequestWith2Filters()
     {
         testParsingFail( SearchRequestTest.class, "request_with_2_filters.xml" );
@@ -706,6 +741,7 @@
     /**
      * Test parsing of a request with Attibutes Element but not any Attribute element
      */
+    @Test
     public void testRequestWithAttributesButNoAttribute()
     {
         Dsmlv2Parser parser = null;
@@ -730,6 +766,7 @@
     /**
      * Test parsing of a request with 2 Attributes elements
      */
+    @Test
     public void testRequestWith2AttributesElements()
     {
         testParsingFail( SearchRequestTest.class, "request_with_2_attributes_elements.xml" );
@@ -740,6 +777,7 @@
      * Test parsing of a request with an Attributes element with 1 Attribute element
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithAttributes1Attribute() throws NamingException
     {
         Dsmlv2Parser parser = null;
@@ -771,6 +809,7 @@
      * Test parsing of a request with an Attributes element with 2 Attribute elements
      * @throws NamingException 
      */
+    @Test
     public void testRequestWithAttributes2Attribute() throws NamingException
     {
         Dsmlv2Parser parser = null;
@@ -804,6 +843,7 @@
     /**
      * Test parsing of a request with 1 Attribute without name attribute
      */
+    @Test
     public void testRequestWithAttributeWithoutNameAttribute()
     {
         testParsingFail( SearchRequestTest.class, "request_with_attribute_without_name_attribute.xml" );
@@ -813,6 +853,7 @@
     /**
      * Test parsing of a request with empty Filter element
      */
+    @Test
     public void testRequestWithEmptyFilter()
     {
         testParsingFail( SearchRequestTest.class, "request_with_empty_filter.xml" );
@@ -822,6 +863,7 @@
     /**
      * Test parsing of a request with an And Filter
      */
+    @Test
     public void testRequestWithAndFilter()
     {
         Dsmlv2Parser parser = null;
@@ -850,6 +892,7 @@
     /**
      * Test parsing of a request with an Or Filter
      */
+    @Test
     public void testRequestWithOrFilter()
     {
         Dsmlv2Parser parser = null;
@@ -878,6 +921,7 @@
     /**
      * Test parsing of a request with an Or Filter
      */
+    @Test
     public void testRequestWithNotFilter()
     {
         Dsmlv2Parser parser = null;
@@ -906,6 +950,7 @@
     /**
      * Test parsing of a request with empty Filter element
      */
+    @Test
     public void testRequestWithNotFilterWith2Children()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_not_with_2_children.xml" );
@@ -915,6 +960,7 @@
     /**
      * Test parsing of a request with an approxMatch Filter
      */
+    @Test
     public void testRequestWithApproxMatchFilter()
     {
         Dsmlv2Parser parser = null;
@@ -953,6 +999,7 @@
     /**
      * Test parsing of a request with an approxMatch Filter with base64 value
      */
+    @Test
     public void testRequestWithApproxMatchFilterBase64Value()
     {
         Dsmlv2Parser parser = null;
@@ -991,6 +1038,7 @@
     /**
      * Test parsing of a request with an approxMatch Filter with empty value
      */
+    @Test
     public void testRequestWithApproxMatchFilterEmptyValue()
     {
         Dsmlv2Parser parser = null;
@@ -1029,6 +1077,7 @@
     /**
      * Test parsing of a request with approxMatch Filter but no name attribute
      */
+    @Test
     public void testRequestWithApproxMatchFilterWithoutName()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_approxMatch_without_name.xml" );
@@ -1038,6 +1087,7 @@
     /**
      * Test parsing of a request with approxMatch Filter but no value element
      */
+    @Test
     public void testRequestWithApproxMatchFilterWithoutValue()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_approxMatch_without_value.xml" );
@@ -1047,6 +1097,7 @@
     /**
      * Test parsing of a request with approxMatch Filter with 2 Value elements
      */
+    @Test
     public void testRequestWithApproxMatchFilterWith2Values()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_approxMatch_with_2_values.xml" );
@@ -1056,6 +1107,7 @@
     /**
      * Test parsing of a request with an greaterOrEqual Filter
      */
+    @Test
     public void testRequestWithGreaterOrEqualFilter()
     {
         Dsmlv2Parser parser = null;
@@ -1094,6 +1146,7 @@
     /**
      * Test parsing of a request with an greaterOrEqual Filter with base64 value
      */
+    @Test
     public void testRequestWithGreaterOrEqualFilterBase64Value()
     {
         Dsmlv2Parser parser = null;
@@ -1132,6 +1185,7 @@
     /**
      * Test parsing of a request with an greaterOrEqual Filter with an empty value
      */
+    @Test
     public void testRequestWithGreaterOrEqualFilterEmptyValue()
     {
         Dsmlv2Parser parser = null;
@@ -1170,6 +1224,7 @@
     /**
      * Test parsing of a request with greaterOrEqual Filter but no name attribute
      */
+    @Test
     public void testRequestWithGreaterOrEqualFilterWithoutName()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_greaterOrEqual_without_name.xml" );
@@ -1179,6 +1234,7 @@
     /**
      * Test parsing of a request with greaterOrEqual Filter but no value element
      */
+    @Test
     public void testRequestWithGreaterOrEqualFilterWithoutValue()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_greaterOrEqual_without_value.xml" );
@@ -1188,6 +1244,7 @@
     /**
      * Test parsing of a request with greaterOrEqual Filter with 2 Value elements
      */
+    @Test
     public void testRequestWithGreaterOrEqualFilterWith2Values()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_greaterOrEqual_with_2_values.xml" );
@@ -1197,6 +1254,7 @@
     /**
      * Test parsing of a request with an lessOrEqual Filter
      */
+    @Test
     public void testRequestWithLessOrEqualFilter()
     {
         Dsmlv2Parser parser = null;
@@ -1235,6 +1293,7 @@
     /**
      * Test parsing of a request with an lessOrEqual Filter with Base64 value
      */
+    @Test
     public void testRequestWithLessOrEqualFilterBase64Value()
     {
         Dsmlv2Parser parser = null;
@@ -1273,6 +1332,7 @@
     /**
      * Test parsing of a request with an lessOrEqual Filter
      */
+    @Test
     public void testRequestWithLessOrEqualFilterEmptyValue()
     {
         Dsmlv2Parser parser = null;
@@ -1311,6 +1371,7 @@
     /**
      * Test parsing of a request with lessOrEqual Filter but no name attribute
      */
+    @Test
     public void testRequestWithLessOrEqualFilterWithoutName()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_lessOrEqual_without_name.xml" );
@@ -1320,6 +1381,7 @@
     /**
      * Test parsing of a request with lessOrEqual Filter but no value element
      */
+    @Test
     public void testRequestWithLessOrEqualFilterWithoutValue()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_lessOrEqual_without_value.xml" );
@@ -1329,6 +1391,7 @@
     /**
      * Test parsing of a request with lessOrEqual Filter with 2 Value elements
      */
+    @Test
     public void testRequestWithLessOrEqualFilterWith2Values()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_lessOrEqual_with_2_values.xml" );
@@ -1338,6 +1401,7 @@
     /**
      * Test parsing of a request with an Equality Filter
      */
+    @Test
     public void testRequestWithEqualityMatchFilter()
     {
         Dsmlv2Parser parser = null;
@@ -1376,6 +1440,7 @@
     /**
      * Test parsing of a request with an Equality Filter with base64 value
      */
+    @Test
     public void testRequestWithEqualityMatchFilterBase64Value()
     {
         Dsmlv2Parser parser = null;
@@ -1414,6 +1479,7 @@
     /**
      * Test parsing of a request with an Equality Filter with an empty value
      */
+    @Test
     public void testRequestWithEqualityMatchFilterWithEmptyValue()
     {
         Dsmlv2Parser parser = null;
@@ -1452,6 +1518,7 @@
     /**
      * Test parsing of a request with EqualityMatch Filter but no name attribute
      */
+    @Test
     public void testRequestWithEqualityMatchFilterWithoutName()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_equalityMatch_without_name.xml" );
@@ -1461,6 +1528,7 @@
     /**
      * Test parsing of a request with EqualityMatch Filter but no value element
      */
+    @Test
     public void testRequestWithEqualityMatchFilterWithoutValue()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_equalityMatch_without_value.xml" );
@@ -1470,6 +1538,7 @@
     /**
      * Test parsing of a request with EqualityMatch Filter with 2 Value elements
      */
+    @Test
     public void testRequestWithEqualityMatchFilterWith2Values()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_equalityMatch_with_2_values.xml" );
@@ -1479,6 +1548,7 @@
     /**
      * Test parsing of a request with an Present Filter
      */
+    @Test
     public void testRequestWithPresentFilter()
     {
         Dsmlv2Parser parser = null;
@@ -1511,6 +1581,7 @@
     /**
      * Test parsing of a request with Present Filter without name attribute
      */
+    @Test
     public void testRequestWithPresentWithoutName()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_present_without_name.xml" );
@@ -1520,6 +1591,7 @@
     /**
      * Test parsing of a request with an ExtensibleMatch Filter
      */
+    @Test
     public void testRequestWithExtensibleMatchFilter()
     {
         Dsmlv2Parser parser = null;
@@ -1554,6 +1626,7 @@
     /**
      * Test parsing of a request with an ExtensibleMatch Filter
      */
+    @Test
     public void testRequestWithExtensibleMatchFilterBase64Value()
     {
         Dsmlv2Parser parser = null;
@@ -1588,6 +1661,7 @@
     /**
      * Test parsing of a request with an ExtensibleMatch Filter with empty value
      */
+    @Test
     public void testRequestWithExtensibleMatchWithEmptyValue()
     {
         Dsmlv2Parser parser = null;
@@ -1622,6 +1696,7 @@
     /**
      * Test parsing of a request with ExtensibleMatch Filter without Value element
      */
+    @Test
     public void testRequestWithExtensibleMatchWithoutValue()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_extensibleMatch_without_value.xml" );
@@ -1631,6 +1706,7 @@
     /**
      * Test parsing of a request with ExtensibleMatch Filter with 2 Value elements
      */
+    @Test
     public void testRequestWithExtensibleMatchWith2Values()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_extensibleMatch_with_2_values.xml" );
@@ -1640,6 +1716,7 @@
     /**
      * Test parsing of a request with typesOnly to true
      */
+    @Test
     public void testRequestWithExtensibleMatchWithDnAttributesTrue()
     {
         Dsmlv2Parser parser = null;
@@ -1672,6 +1749,7 @@
     /**
      * Test parsing of a request with typesOnly to 1
      */
+    @Test
     public void testRequestWithExtensibleMatchWithDnAttributes1()
     {
         Dsmlv2Parser parser = null;
@@ -1704,6 +1782,7 @@
     /**
      * Test parsing of a request with typesOnly to false
      */
+    @Test
     public void testRequestWithExtensibleMatchWithDnAttributesFalse()
     {
         Dsmlv2Parser parser = null;
@@ -1736,6 +1815,7 @@
     /**
      * Test parsing of a request with typesOnly to 0
      */
+    @Test
     public void testRequestWithExtensibleMatchWithDnAttributes0()
     {
         Dsmlv2Parser parser = null;
@@ -1768,6 +1848,7 @@
     /**
      * Test parsing of a request with typesOnly to an error value
      */
+    @Test
     public void testRequestWithExtensibleMatchWithDnAttributesError()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_extensibleMatch_with_dnAttributes_error.xml" );
@@ -1777,6 +1858,7 @@
     /**
      * Test parsing of a request with a matchingRule attribute
      */
+    @Test
     public void testRequestWithExtensibleMatchWithMatchingRule()
     {
         Dsmlv2Parser parser = null;
@@ -1809,6 +1891,7 @@
     /**
      * Test parsing of a request with a name attribute
      */
+    @Test
     public void testRequestWithExtensibleMatchWithName()
     {
         Dsmlv2Parser parser = null;
@@ -1841,6 +1924,7 @@
     /**
      * Test parsing of a request with an Substrings Filter
      */
+    @Test
     public void testRequestWithSubstringsFilter()
     {
         Dsmlv2Parser parser = null;
@@ -1873,6 +1957,7 @@
     /**
      * Test parsing of a request with Substrings Filter without name
      */
+    @Test
     public void testRequestWithSubstringsWithoutName()
     {
         testParsingFail( SearchRequestTest.class, "filters/request_with_substrings_without_name.xml" );
@@ -1882,6 +1967,7 @@
     /**
      * Test parsing of a request with a Substrings Filter with 1 Initial element
      */
+    @Test
     public void testRequestWithSubstrings1Initial()
     {
         Dsmlv2Parser parser = null;
@@ -1914,6 +2000,7 @@
     /**
      * Test parsing of a request with a Substrings Filter with 1 Initial element with Base64 value
      */
+    @Test
     public void testRequestWithSubstrings1Base64Initial()
     {
         Dsmlv2Parser parser = null;
@@ -1946,6 +2033,7 @@
     /**
      * Test parsing of a request with a Substrings Filter with 1 emptyInitial element
      */
+    @Test
     public void testRequestWithSubstrings1EmptyInitial()
     {
         Dsmlv2Parser parser = null;
@@ -1978,6 +2066,7 @@
     /**
      * Test parsing of a request with a Substrings Filter with 1 Initial and 1 Any elements
      */
+    @Test
     public void testRequestWithSubstrings1Initial1Any()
     {
         Dsmlv2Parser parser = null;
@@ -2016,6 +2105,7 @@
     /**
      * Test parsing of a request with a Substrings Filter with 1 Initial and 1 Final elements
      */
+    @Test
     public void testRequestWithSubstrings1Initial1Final()
     {
         Dsmlv2Parser parser = null;
@@ -2050,6 +2140,7 @@
     /**
      * Test parsing of a request with a Substrings Filter with 1 Any element
      */
+    @Test
     public void testRequestWithSubstrings1Any()
     {
         Dsmlv2Parser parser = null;
@@ -2085,6 +2176,7 @@
     /**
      * Test parsing of a request with a Substrings Filter with 1 Any element
      */
+    @Test
     public void testRequestWithSubstrings1Base64Any()
     {
         Dsmlv2Parser parser = null;
@@ -2120,6 +2212,7 @@
     /**
      * Test parsing of a request with a Substrings Filter with 1 empty Any element
      */
+    @Test
     public void testRequestWithSubstrings1EmptyAny()
     {
         Dsmlv2Parser parser = null;
@@ -2154,6 +2247,7 @@
     /**
      * Test parsing of a request with a Substrings Filter with 1 Any element
      */
+    @Test
     public void testRequestWithSubstrings2Any()
     {
         Dsmlv2Parser parser = null;
@@ -2192,6 +2286,7 @@
     /**
      * Test parsing of a request with a Substrings Filter with 1 Any and 1 Final elements
      */
+    @Test
     public void testRequestWithSubstrings1Any1Final()
     {
         Dsmlv2Parser parser = null;
@@ -2230,6 +2325,7 @@
     /**
      * Test parsing of a request with a Substrings Filter with 1 Final element
      */
+    @Test
     public void testRequestWithSubstrings1Final()
     {
         Dsmlv2Parser parser = null;
@@ -2262,6 +2358,7 @@
     /**
      * Test parsing of a request with a Substrings Filter with 1 Final element
      */
+    @Test
     public void testRequestWithSubstrings1Base64Final()
     {
         Dsmlv2Parser parser = null;
@@ -2294,6 +2391,7 @@
     /**
      * Test parsing of a request with a Substrings Filter with 1 empty Final element
      */
+    @Test
     public void testRequestWithSubstrings1EmptyFinal()
     {
         Dsmlv2Parser parser = null;
@@ -2328,6 +2426,7 @@
      * 
      * DIRSTUDIO-1
      */
+    @Test
     public void testRequestWithNeededRequestId()
     {
         testParsingFail( SearchRequestTest.class, "request_with_needed_requestID.xml" );

Modified: directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/SearchResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/SearchResponseTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/SearchResponseTest.java (original)
+++ directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/SearchResponseTest.java Tue Sep  1 12:28:00 2009
@@ -24,7 +24,10 @@
 import org.apache.directory.shared.dsmlv2.AbstractResponseTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2ResponseParser;
 import org.apache.directory.shared.dsmlv2.reponse.SearchResponse;
-
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * Tests for the Search Result Done Response parsing
@@ -37,6 +40,7 @@
     /**
      * Test parsing of a Response with the (optional) requestID attribute
      */
+    @Test
     public void testResponseWithRequestId()
     {
         Dsmlv2ResponseParser parser = null;
@@ -63,6 +67,7 @@
     /**
      * Test parsing of a Response with the (optional) requestID attribute equals 0
      */
+    @Test
     public void testResponseWithRequestIdEquals0()
     {
         testParsingFail( SearchResponseTest.class, "response_with_requestID_equals_0.xml" );
@@ -72,6 +77,7 @@
     /**
      * Test parsing of a Response with a Search Result Done
      */
+    @Test
     public void testResponseWithSRD()
     {
         Dsmlv2ResponseParser parser = null;
@@ -97,6 +103,7 @@
     /**
      * Test parsing of a Response with 1 Search Result Entry and a Search Result Done
      */
+    @Test
     public void testResponseWith1SRE1SRD()
     {
         Dsmlv2ResponseParser parser = null;
@@ -125,6 +132,7 @@
     /**
      * Test parsing of a Response with 1 Search Result Reference and a Search Result Done
      */
+    @Test
     public void testResponseWith1SRR1SRD()
     {
         Dsmlv2ResponseParser parser = null;
@@ -153,6 +161,7 @@
     /**
      * Test parsing of a Response with 1 Search Result Entry, 1 Search Result Reference and a Search Result Done
      */
+    @Test
     public void testResponseWith1SRE1SRR1SRD()
     {
         Dsmlv2ResponseParser parser = null;
@@ -183,6 +192,7 @@
     /**
      * Test parsing of a Response with 2 Search Result Entry and a Search Result Done
      */
+    @Test
     public void testResponseWith2SRE1SRD()
     {
         Dsmlv2ResponseParser parser = null;
@@ -211,6 +221,7 @@
     /**
      * Test parsing of a Response with 2 Search Result Reference and a Search Result Done
      */
+    @Test
     public void testResponseWith2SRR1SRD()
     {
         Dsmlv2ResponseParser parser = null;
@@ -239,6 +250,7 @@
     /**
      * Test parsing of a Response with 2 Search Result Entry, 2 Search Result Reference and a Search Result Done
      */
+    @Test
     public void testResponseWith2SRE2SRR1SRD()
     {
         Dsmlv2ResponseParser parser = null;
@@ -269,6 +281,7 @@
     /**
      * Test parsing of a response with no Search Result Done
      */
+    @Test
     public void testResponseWith0SRD()
     {
         testParsingFail( SearchResponseTest.class, "response_with_0_SRD.xml" );
@@ -278,6 +291,7 @@
     /**
      * Test parsing of a response with 1 Search Result Entry but no Search Result Done
      */
+    @Test
     public void testResponseWith1SRE0SRD()
     {
         testParsingFail( SearchResponseTest.class, "response_with_1_SRE_0_SRD.xml" );
@@ -287,6 +301,7 @@
     /**
      * Test parsing of a response with 1 Search Result Reference but no Search Result Done
      */
+    @Test
     public void testResponseWith1SRR0SRD()
     {
         testParsingFail( SearchResponseTest.class, "response_with_1_SRR_0_SRD.xml" );

Modified: directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java (original)
+++ directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java Tue Sep  1 12:28:00 2009
@@ -33,6 +33,12 @@
 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;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
 
 import com.sun.jndi.ldap.LdapURL;
 
@@ -48,6 +54,7 @@
     /**
      * Test parsing of a response with a (optional) Control element
      */
+    @Test
     public void testResponseWith1Control()
     {
         Dsmlv2ResponseParser parser = null;
@@ -83,6 +90,7 @@
     /**
      * Test parsing of a response with a (optional) Control element with empty value
      */
+    @Test
     public void testResponseWith1ControlEmptyValue()
     {
         Dsmlv2ResponseParser parser = null;
@@ -114,6 +122,7 @@
     /**
      * Test parsing of a response with 2 (optional) Control elements
      */
+    @Test
     public void testResponseWith2Controls()
     {
         Dsmlv2ResponseParser parser = null;
@@ -149,6 +158,7 @@
     /**
      * Test parsing of a response with 3 (optional) Control elements without value
      */
+    @Test
     public void testResponseWith3ControlsWithoutValue()
     {
         Dsmlv2ResponseParser parser = null;
@@ -184,6 +194,7 @@
     /**
      * Test parsing of a Response with the (optional) requestID attribute
      */
+    @Test
     public void testResponseWithRequestId()
     {
         Dsmlv2ResponseParser parser = null;
@@ -211,6 +222,7 @@
     /**
      * Test parsing of a Response with the (optional) requestID attribute equals 0
      */
+    @Test
     public void testResponseWithRequestIdEquals0()
     {
         testParsingFail( SearchResultDoneTest.class, "response_with_requestID_equals_0.xml" );
@@ -220,6 +232,7 @@
     /**
      * Test parsing of a response without Result Code element
      */
+    @Test
     public void testResponseWithoutResultCode()
     {
         testParsingFail( SearchResultDoneTest.class, "response_without_result_code.xml" );
@@ -229,6 +242,7 @@
     /**
      * Test parsing of a response with Result Code element but a not integer value
      */
+    @Test
     public void testResponseWithResultCodeNotInteger()
     {
         testParsingFail( SearchResultDoneTest.class, "response_with_result_code_not_integer.xml" );
@@ -238,6 +252,7 @@
     /**
      * Test parsing of a response with Result Code 
      */
+    @Test
     public void testResponseWithResultCode()
     {
         Dsmlv2ResponseParser parser = null;
@@ -267,6 +282,7 @@
     /**
      * Test parsing of a response with Error Message
      */
+    @Test
     public void testResponseWithErrorMessage()
     {
         Dsmlv2ResponseParser parser = null;
@@ -297,6 +313,7 @@
     /**
      * Test parsing of a response with empty Error Message
      */
+    @Test
     public void testResponseWithEmptyErrorMessage()
     {
         Dsmlv2ResponseParser parser = null;
@@ -326,6 +343,7 @@
     /**
      * Test parsing of a response with a Referral
      */
+    @Test
     public void testResponseWith1Referral()
     {
         Dsmlv2ResponseParser parser = null;
@@ -348,7 +366,7 @@
 
         LdapResultCodec ldapResult = searchResultDone.getLdapResult();
 
-        List referrals = ldapResult.getReferrals();
+        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
 
         assertEquals( 1, referrals.size() );
 
@@ -368,6 +386,7 @@
     /**
      * Test parsing of a response with an empty Referral
      */
+    @Test
     public void testResponseWith1EmptyReferral()
     {
         Dsmlv2ResponseParser parser = null;
@@ -390,7 +409,7 @@
 
         LdapResultCodec ldapResult = searchResultDone.getLdapResult();
 
-        List referrals = ldapResult.getReferrals();
+        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
 
         assertEquals( 0, referrals.size() );
     }
@@ -399,6 +418,7 @@
     /**
      * Test parsing of a response with 2 Referral elements
      */
+    @Test
     public void testResponseWith2Referrals()
     {
         Dsmlv2ResponseParser parser = null;
@@ -421,7 +441,7 @@
 
         LdapResultCodec ldapResult = searchResultDone.getLdapResult();
 
-        List referrals = ldapResult.getReferrals();
+        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
 
         assertEquals( 2, referrals.size() );
 
@@ -452,6 +472,7 @@
     /**
      * Test parsing of a response with a Referral and an Error Message
      */
+    @Test
     public void testResponseWith1ReferralAndAnErrorMessage()
     {
         Dsmlv2ResponseParser parser = null;
@@ -474,7 +495,7 @@
 
         LdapResultCodec ldapResult = searchResultDone.getLdapResult();
 
-        List referrals = ldapResult.getReferrals();
+        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
 
         assertEquals( 1, referrals.size() );
 
@@ -494,6 +515,7 @@
     /**
      * Test parsing of a response with MatchedDN attribute
      */
+    @Test
     public void testResponseWithMatchedDNAttribute()
     {
         Dsmlv2ResponseParser parser = null;
@@ -523,6 +545,7 @@
     /**
      * Test parsing of a response with wrong matched DN
      */
+    @Test
     public void testResponseWithWrongMatchedDN()
     {
         testParsingFail( SearchResultDoneTest.class, "response_with_wrong_matchedDN_attribute.xml" );
@@ -532,6 +555,7 @@
     /**
      * Test parsing of a response with wrong Descr attribute
      */
+    @Test
     public void testResponseWithWrongDescr()
     {
         testParsingFail( SearchResultDoneTest.class, "response_with_wrong_descr.xml" );

Modified: directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java (original)
+++ directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java Tue Sep  1 12:28:00 2009
@@ -33,7 +33,11 @@
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
 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;
+import static org.junit.Assert.assertFalse;
 
 /**
  * Tests for the Search Result Entry Response parsing
@@ -46,6 +50,7 @@
     /**
      * Test parsing of a response with a (optional) Control element
      */
+    @Test
     public void testResponseWith1Control()
     {
         Dsmlv2ResponseParser parser = null;
@@ -81,6 +86,7 @@
     /**
      * Test parsing of a response with a (optional) Control element with empty value
      */
+    @Test
     public void testResponseWith1ControlEmptyValue()
     {
         Dsmlv2ResponseParser parser = null;
@@ -112,6 +118,7 @@
     /**
      * Test parsing of a response with 2 (optional) Control elements
      */
+    @Test
     public void testResponseWith2Controls()
     {
         Dsmlv2ResponseParser parser = null;
@@ -147,6 +154,7 @@
     /**
      * Test parsing of a response with 3 (optional) Control elements without value
      */
+    @Test
     public void testResponseWith3ControlsWithoutValue()
     {
         Dsmlv2ResponseParser parser = null;
@@ -182,6 +190,7 @@
     /**
      * Test parsing of a response without dn Attribute
      */
+    @Test
     public void testResponseWithoutDnAttribute()
     {
         testParsingFail( SearchResultEntryTest.class, "response_without_dn_attribute.xml" );
@@ -191,6 +200,7 @@
     /**
      * Test parsing of a response with wrong dn Attribute
      */
+    @Test
     public void testResponseWithWrongDnAttribute()
     {
         testParsingFail( SearchResultEntryTest.class, "response_with_wrong_dn_attribute.xml" );
@@ -200,6 +210,7 @@
     /**
      * Test parsing of a response with dn Attribute
      */
+    @Test
     public void testResponseWithDnAttribute()
     {
         Dsmlv2ResponseParser parser = null;
@@ -227,6 +238,7 @@
     /**
      * Test parsing of a Response with the (optional) requestID attribute
      */
+    @Test
     public void testResponseWithRequestId()
     {
         Dsmlv2ResponseParser parser = null;
@@ -254,6 +266,7 @@
     /**
      * Test parsing of a Response with the (optional) requestID attribute equals 0
      */
+    @Test
     public void testResponseWithRequestIdEquals0()
     {
         testParsingFail( SearchResultEntryTest.class, "response_with_requestID_equals_0.xml" );
@@ -263,6 +276,7 @@
     /**
      * Test parsing of a response with 0 Attr
      */
+    @Test
     public void testResponseWith0Attr()
     {
         Dsmlv2ResponseParser parser = null;
@@ -287,6 +301,7 @@
     /**
      * Test parsing of a response with 1 Attr 0 Value
      */
+    @Test
     public void testResponseWith1Attr0Value()
     {
         Dsmlv2ResponseParser parser = null;
@@ -319,6 +334,7 @@
     /**
      * Test parsing of a response with 1 Attr 1 Value
      */
+    @Test
     public void testResponseWith1Attr1Value()
     {
         Dsmlv2ResponseParser parser = null;
@@ -357,6 +373,7 @@
      * Test parsing of a response with 1 Attr 1 Base64 Value
      * @throws UnsupportedEncodingException 
      */
+    @Test
     public void testResponseWith1Attr1Base64Value() throws UnsupportedEncodingException
     {
         Dsmlv2ResponseParser parser = null;
@@ -399,6 +416,7 @@
     /**
      * Test parsing of a response with 1 Attr 1 empty Value
      */
+    @Test
     public void testResponseWith1Attr1EmptyValue()
     {
         Dsmlv2ResponseParser parser = null;
@@ -437,6 +455,7 @@
     /**
      * Test parsing of a response with 1 Attr 2 Value
      */
+    @Test
     public void testResponseWith1Attr2Value()
     {
         Dsmlv2ResponseParser parser = null;
@@ -479,6 +498,7 @@
     /**
      * Test parsing of a response with 2 Attr 1 Value
      */
+    @Test
     public void testResponseWith2Attr1Value()
     {
         Dsmlv2ResponseParser parser = null;
@@ -525,6 +545,7 @@
     /**
      * Test parsing of a response with 1 Attr without name Attribute
      */
+    @Test
     public void testResponseWith1AttrWithoutNameAttribute()
     {
         testParsingFail( SearchResultEntryTest.class, "response_with_1_attr_without_name_attribute.xml" );

Modified: directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultReference/SearchResultReferenceTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultReference/SearchResultReferenceTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultReference/SearchResultReferenceTest.java (original)
+++ directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultReference/SearchResultReferenceTest.java Tue Sep  1 12:28:00 2009
@@ -31,7 +31,11 @@
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 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;
+import static org.junit.Assert.assertFalse;
 
 /**
  * Tests for the Search Result Reference Response parsing
@@ -44,6 +48,7 @@
     /**
      * Test parsing of a response with a (optional) Control element
      */
+    @Test
     public void testResponseWith1Control()
     {
         Dsmlv2ResponseParser parser = null;
@@ -79,6 +84,7 @@
     /**
      * Test parsing of a response with a (optional) Control element with empty value
      */
+    @Test
     public void testResponseWith1ControlEmptyValue()
     {
         Dsmlv2ResponseParser parser = null;
@@ -114,6 +120,7 @@
     /**
      * Test parsing of a response with 2 (optional) Control elements
      */
+    @Test
     public void testResponseWith2Controls()
     {
         Dsmlv2ResponseParser parser = null;
@@ -149,6 +156,7 @@
     /**
      * Test parsing of a response with 3 (optional) Control elements without value
      */
+    @Test
     public void testResponseWith3ControlsWithoutValue()
     {
         Dsmlv2ResponseParser parser = null;
@@ -184,6 +192,7 @@
     /**
      * Test parsing of a Response with the (optional) requestID attribute
      */
+    @Test
     public void testResponseWithRequestId()
     {
         Dsmlv2ResponseParser parser = null;
@@ -211,6 +220,7 @@
     /**
      * Test parsing of a Response with the (optional) requestID attribute equals 0
      */
+    @Test
     public void testResponseWithRequestIdEquals0()
     {
         testParsingFail( SearchResultReferenceTest.class, "response_with_requestID_equals_0.xml" );
@@ -220,6 +230,7 @@
     /**
      * Test parsing of a response with 0 Ref
      */
+    @Test
     public void testResponseWith0Ref()
     {
         testParsingFail( SearchResultReferenceTest.class, "response_with_0_ref.xml" );
@@ -229,6 +240,7 @@
     /**
      * Test parsing of a Response with 1 Ref
      */
+    @Test
     public void testResponseWith1Ref()
     {
         Dsmlv2ResponseParser parser = null;
@@ -249,7 +261,7 @@
         SearchResultReferenceCodec searchResultReference = ( ( SearchResponse ) parser.getBatchResponse()
             .getCurrentResponse() ).getCurrentSearchResultReference();
 
-        List references = searchResultReference.getSearchResultReferences();
+        List<org.apache.directory.shared.ldap.util.LdapURL> references = searchResultReference.getSearchResultReferences();
 
         assertEquals( 1, references.size() );
 
@@ -267,6 +279,7 @@
     /**
      * Test parsing of a Response with 1 Ref
      */
+    @Test
     public void testResponseWith1EmptyRef()
     {
         Dsmlv2ResponseParser parser = null;
@@ -287,7 +300,7 @@
         SearchResultReferenceCodec searchResultReference = ( ( SearchResponse ) parser.getBatchResponse()
             .getCurrentResponse() ).getCurrentSearchResultReference();
 
-        List references = searchResultReference.getSearchResultReferences();
+        List<org.apache.directory.shared.ldap.util.LdapURL> references = searchResultReference.getSearchResultReferences();
 
         assertEquals( 0, references.size() );
     }
@@ -296,6 +309,7 @@
     /**
      * Test parsing of a Response with 2 Ref
      */
+    @Test
     public void testResponseWith2Ref()
     {
         Dsmlv2ResponseParser parser = null;
@@ -316,7 +330,7 @@
         SearchResultReferenceCodec searchResultReference = ( ( SearchResponse ) parser.getBatchResponse()
             .getCurrentResponse() ).getCurrentSearchResultReference();
 
-        List references = searchResultReference.getSearchResultReferences();
+        List<org.apache.directory.shared.ldap.util.LdapURL> references = searchResultReference.getSearchResultReferences();
 
         assertEquals( 2, references.size() );
 
@@ -343,6 +357,7 @@
     /**
      * Test parsing of a response with 1 wrong Ref
      */
+    @Test
     public void testResponseWith1WrongRef()
     {
         testParsingFail( SearchResultReferenceTest.class, "response_with_1_wrong_ref.xml" );

Modified: directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractorTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractorTest.java (original)
+++ directory/shared/branches/shared-schema/ldap-schema/src/test/java/org/apache/directory/shared/ldap/schema/ldif/extractor/SchemaLdifExtractorTest.java Tue Sep  1 12:28:00 2009
@@ -22,7 +22,7 @@
 
 import java.io.File;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
  
 /**
@@ -31,8 +31,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class SchemaLdifExtractorTest extends TestCase
+public class SchemaLdifExtractorTest
 {
+    @Test
     public void testExtract() throws Exception
     {
         SchemaLdifExtractor extractor = new SchemaLdifExtractor( 

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastLdapDnParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastLdapDnParserTest.java?rev=810002&r1=810001&r2=810002&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastLdapDnParserTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/FastLdapDnParserTest.java Tue Sep  1 12:28:00 2009
@@ -25,11 +25,12 @@
 import javax.naming.NameParser;
 import javax.naming.NamingException;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
 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;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * Tests the fast DN parser.
@@ -40,16 +41,17 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 696620 $, $Date: 2008-09-18 12:09:30 +0200 (Do, 18 Sep 2008) $, 
  */
-public class FastLdapDnParserTest extends TestCase
+public class FastLdapDnParserTest
 {
 
     /**
      * test an empty DN
      */
+    @Test
     public void testLdapDNEmpty() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
-        Assert.assertEquals( "", ( ( LdapDN ) dnParser.parse( "" ) ).getUpName() );
+        assertEquals( "", ( ( LdapDN ) dnParser.parse( "" ) ).getUpName() );
     }
 
 
@@ -57,6 +59,7 @@
      * Tests incomplete DNs, used to check that the parser does not 
      * run into infinite loops.
      */
+    @Test
     public void testLdapDNIncomplete() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
@@ -151,35 +154,38 @@
     /**
      * test a simple DN : a = b
      */
+    @Test
     public void testLdapDNSimple() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
-        Assert.assertEquals( "a = b", ( ( LdapDN ) dnParser.parse( "a = b" ) ).getUpName() );
-        Assert.assertEquals( "a=b", ( ( LdapDN ) dnParser.parse( "a = b" ) ).toString() );
+        assertEquals( "a = b", ( ( LdapDN ) dnParser.parse( "a = b" ) ).getUpName() );
+        assertEquals( "a=b", ( ( LdapDN ) dnParser.parse( "a = b" ) ).toString() );
     }
 
 
     /**
      * test a composite DN : a = b, d = e
      */
+    @Test
     public void testLdapDNComposite() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a = b, c = d" );
-        Assert.assertEquals( "a=b,c=d", dn.toString() );
-        Assert.assertEquals( "a = b, c = d", dn.getUpName() );
+        assertEquals( "a=b,c=d", dn.toString() );
+        assertEquals( "a = b, c = d", dn.getUpName() );
     }
 
 
     /**
      * test a composite DN with or without spaces: a=b, a =b, a= b, a = b, a = b
      */
+    @Test
     public void testLdapDNCompositeWithSpace() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a=b, a =b, a= b, a = b, a  =  b" );
-        Assert.assertEquals( "a=b,a=b,a=b,a=b,a=b", dn.toString() );
-        Assert.assertEquals( "a=b, a =b, a= b, a = b, a  =  b", dn.getUpName() );
+        assertEquals( "a=b,a=b,a=b,a=b,a=b", dn.toString() );
+        assertEquals( "a=b, a =b, a= b, a = b, a  =  b", dn.getUpName() );
     }
 
 
@@ -187,18 +193,20 @@
      * test a composite DN with differents separators : a=b;c=d,e=f It should
      * return a=b,c=d,e=f (the ';' is replaced by a ',')
      */
+    @Test
     public void testLdapDNCompositeSepators() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "a=b;c=d,e=f" );
-        Assert.assertEquals( "a=b,c=d,e=f", dn.toString() );
-        Assert.assertEquals( "a=b;c=d,e=f", dn.getUpName() );
+        assertEquals( "a=b,c=d,e=f", dn.toString() );
+        assertEquals( "a=b;c=d,e=f", dn.getUpName() );
     }
 
 
     /**
      * test a simple DN with multiple NameComponents : a = b + c = d
      */
+    @Test
     public void testLdapDNSimpleMultivaluedAttribute() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
@@ -218,6 +226,7 @@
      * test a composite DN with multiple NC and separators : a=b+c=d, e=f + g=h +
      * i=j
      */
+    @Test
     public void testLdapDNCompositeMultivaluedAttribute() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
@@ -236,6 +245,7 @@
     /**
      * test a simple DN with an oid prefix (uppercase) : OID.12.34.56 = azerty
      */
+    @Test
     public void testLdapDNOidUpper() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
@@ -254,6 +264,7 @@
     /**
      * test a simple DN with an oid prefix (lowercase) : oid.12.34.56 = azerty
      */
+    @Test
     public void testLdapDNOidLower() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
@@ -273,12 +284,13 @@
      * test a simple DN with an oid attribut without oid prefix : 12.34.56 =
      * azerty
      */
+    @Test
     public void testLdapDNOidWithoutPrefix() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "12.34.56 = azerty" );
-        Assert.assertEquals( "12.34.56=azerty", dn.toString() );
-        Assert.assertEquals( "12.34.56 = azerty", dn.getUpName() );
+        assertEquals( "12.34.56=azerty", dn.toString() );
+        assertEquals( "12.34.56 = azerty", dn.getUpName() );
     }
 
 
@@ -286,18 +298,20 @@
      * test a composite DN with an oid attribut wiithout oid prefix : 12.34.56 =
      * azerty; 7.8 = test
      */
+    @Test
     public void testLdapDNCompositeOidWithoutPrefix() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN dn = ( LdapDN ) dnParser.parse( "12.34.56 = azerty; 7.8 = test" );
-        Assert.assertEquals( "12.34.56=azerty,7.8=test", dn.toString() );
-        Assert.assertEquals( "12.34.56 = azerty; 7.8 = test", dn.getUpName() );
+        assertEquals( "12.34.56=azerty,7.8=test", dn.toString() );
+        assertEquals( "12.34.56 = azerty; 7.8 = test", dn.getUpName() );
     }
 
 
     /**
      * test a simple DN with pair char attribute value : a = \,\=\+\<\>\#\;\\\"\C3\A9"
      */
+    @Test
     public void testLdapDNPairCharAttributeValue() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
@@ -316,6 +330,7 @@
     /**
      * test a simple DN with hexString attribute value : a = #0010A0AAFF
      */
+    @Test
     public void testLdapDNHexStringAttributeValue() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
@@ -334,6 +349,7 @@
     /**
      * test exception from illegal hexString attribute value : a=#zz.
      */
+    @Test
     public void testBadLdapDNHexStringAttributeValue() throws NamingException
     {
         try
@@ -352,6 +368,7 @@
     /**
      * test a simple DN with quoted attribute value : a = "quoted \"value"
      */
+    @Test
     public void testLdapDNQuotedAttributeValue() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
@@ -370,6 +387,7 @@
     /**
      * Test the encoding of a LdanDN
      */
+    @Test
     public void testNameToBytes() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
@@ -377,11 +395,12 @@
 
         byte[] bytes = LdapDN.getBytes( dn );
 
-        Assert.assertEquals( 30, bytes.length );
-        Assert.assertEquals( "cn=John,ou=People,ou=Marketing", StringTools.utf8ToString( bytes ) );
+        assertEquals( 30, bytes.length );
+        assertEquals( "cn=John,ou=People,ou=Marketing", StringTools.utf8ToString( bytes ) );
     }
 
 
+    @Test
     public void testStringParser() throws NamingException
     {
         String dn = StringTools.utf8ToString( new byte[]
@@ -391,11 +410,12 @@
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN name = ( LdapDN ) dnParser.parse( dn );
 
-        Assert.assertEquals( dn, name.getUpName() );
-        Assert.assertEquals( "cn=Emmanuel  L\u00e9charny", name.toString() );
+        assertEquals( dn, name.getUpName() );
+        assertEquals( "cn=Emmanuel  L\u00e9charny", name.toString() );
     }
 
 
+    @Test
     public void testStringParserShort() throws NamingException
     {
         String dn = StringTools.utf8ToString( new byte[]
@@ -404,11 +424,12 @@
         NameParser dnParser = FastLdapDnParser.getNameParser();
         LdapDN name = ( LdapDN ) dnParser.parse( dn );
 
-        Assert.assertEquals( dn, name.getUpName() );
-        Assert.assertEquals( "c=E\u00e9c", name.toString() );
+        assertEquals( dn, name.getUpName() );
+        assertEquals( "c=E\u00e9c", name.toString() );
     }
 
 
+    @Test
     public void testVsldapExtras() throws NamingException
     {
         NameParser dnParser = FastLdapDnParser.getNameParser();
@@ -431,6 +452,7 @@
      * @throws NamingException
      *             if anything goes wrong
      */
+    @Test
     public final void testDnParser()
     {
         NameParser parser = FastLdapDnParser.getNameParser();
@@ -445,6 +467,7 @@
      * @throws NamingException
      *             if anything goes wrong
      */
+    @Test
     public final void testParseStringEmpty() throws NamingException
     {
         NameParser parser = FastLdapDnParser.getNameParser();
@@ -461,6 +484,7 @@
      * @throws NamingException
      *             if anything goes wrong
      */
+    @Test
     public final void testParseStringNull() throws NamingException
     {
         NameParser parser = FastLdapDnParser.getNameParser();
@@ -477,6 +501,7 @@
      * @throws NamingException
      *             if anything goes wrong
      */
+    @Test
     public final void testParseStringRFC1779_1() throws NamingException
     {
         NameParser parser = FastLdapDnParser.getNameParser();
@@ -498,6 +523,7 @@
      * @throws NamingException
      *             if anything goes wrong
      */
+    @Test
     public final void testParseStringRFC2253_1() throws NamingException
     {
         NameParser parser = FastLdapDnParser.getNameParser();
@@ -514,6 +540,7 @@
      * @throws NamingException
      *             if anything goes wrong
      */
+    @Test
     public final void testParseStringRFC2253_2() throws NamingException
     {
         NameParser parser = FastLdapDnParser.getNameParser();
@@ -536,6 +563,7 @@
      * @throws NamingException
      *             if anything goes wrong
      */
+    @Test
     public final void testParseStringRFC2253_3() throws NamingException
     {
         NameParser parser = FastLdapDnParser.getNameParser();
@@ -558,6 +586,7 @@
      * @throws NamingException
      *             if anything goes wrong
      */
+    @Test
     public final void testParseStringRFC2253_4() throws NamingException
     {
         NameParser parser = FastLdapDnParser.getNameParser();
@@ -580,6 +609,7 @@
      * @throws NamingException
      *             if anything goes wrong
      */
+    @Test
     public final void testParseStringRFC2253_5() throws NamingException
     {
         NameParser parser = FastLdapDnParser.getNameParser();
@@ -602,6 +632,7 @@
      * @throws NamingException
      *             if anything goes wrong
      */
+    @Test
     public final void testParseStringRFC2253_6() throws NamingException
     {
         NameParser parser = FastLdapDnParser.getNameParser();
@@ -624,6 +655,7 @@
      * @throws NamingException
      *             if anything goes wrong
      */
+    @Test
     public final void testParseInvalidString()
     {
         NameParser parser = FastLdapDnParser.getNameParser();
@@ -649,6 +681,7 @@
      * @throws NamingException
      *             if anything goes wrong on parse()
      */
+    @Test
     public final void testPreserveSpaceAfterEscape() throws NamingException
     {
         NameParser parser = FastLdapDnParser.getNameParser();
@@ -665,6 +698,7 @@
     }
 
 
+    @Test
     public void testWindowsFilePath() throws Exception
     {
         // '\' should be escaped as stated in RFC 2253
@@ -682,6 +716,7 @@
     }
 
 
+    @Test
     public void testNameFrenchChars() throws Exception
     {
         String cn = new String( new byte[]
@@ -696,6 +731,7 @@
     }
 
 
+    @Test
     public void testNameGermanChars() throws Exception
     {
         String cn = new String( new byte[]
@@ -710,6 +746,7 @@
     }
 
 
+    @Test
     public void testNameTurkishChars() throws Exception
     {
         String cn = new String( new byte[]
@@ -726,6 +763,7 @@
     }
 
 
+    @Test
     public void testAUmlautPlusBytes() throws Exception
     {
         String cn = new String( new byte[]
@@ -743,6 +781,7 @@
     }
 
 
+    @Test
     public void testAUmlautPlusChar() throws Exception
     {
         String cn = new String( new byte[]
@@ -768,6 +807,7 @@
      * @throws NamingException
      *             if anything goes wrong on parse()
      */
+    @Test
     public final void testNonEscapedChars() throws NamingException
     {
         NameParser parser = FastLdapDnParser.getNameParser();
@@ -784,5 +824,4 @@
             return;
         }
     }
-
 }



Mime
View raw message