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 2012/01/24 18:44:32 UTC
svn commit: r1235374 [21/27] - in /directory/shared/trunk:
ldap/model/src/main/java/org/apache/directory/shared/ldap/model/constants/
ldap/model/src/main/java/org/apache/directory/shared/ldap/model/csn/
ldap/model/src/main/java/org/apache/directory/sha...
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java Tue Jan 24 17:44:03 2012
@@ -54,7 +54,8 @@ public class RdnTest
{
/** A null schemaManager used in tests */
SchemaManager schemaManager = null;
-
+
+
/**
* Test a null Rdn
*/
@@ -221,9 +222,9 @@ public class RdnTest
@Test
public void testRdnPairCharAttributeValue() throws LdapException
{
- String rdn = Strings.utf8ToString(new byte[]
- {'a', '=', '\\', ',', '=', '\\', '+', '\\', '<', '\\', '>', '#', '\\', ';', '\\', '\\', '\\', '"', '\\',
- 'C', '3', '\\', 'A', '9'});
+ String rdn = Strings.utf8ToString( new byte[]
+ { 'a', '=', '\\', ',', '=', '\\', '+', '\\', '<', '\\', '>', '#', '\\', ';', '\\', '\\', '\\', '"', '\\',
+ 'C', '3', '\\', 'A', '9' } );
assertEquals( "a=\\,=\\+\\<\\>#\\;\\\\\\\"\u00E9", new Rdn( rdn ).getNormName() );
}
@@ -237,6 +238,7 @@ public class RdnTest
assertEquals( "a=#0010A0AAFF", new Rdn( "a = #0010A0AAFF" ).getNormName() );
}
+
/**
* test exception from illegal hexString attribute value : a=#zz.
*/
@@ -254,6 +256,7 @@ public class RdnTest
}
}
+
/**
* test a simple Rdn with quoted attribute value : a = "quoted \"value"
*
@@ -276,7 +279,7 @@ public class RdnTest
{
Rdn rdn = new Rdn( "a", "b" );
- Rdn rdnClone = (Rdn) rdn.clone();
+ Rdn rdnClone = ( Rdn ) rdn.clone();
rdn = new Rdn( "c=d" );
@@ -308,7 +311,7 @@ public class RdnTest
{
Rdn rdn = new Rdn( "a = b + aa = bb" );
- Rdn rdnClone = (Rdn) rdn.clone();
+ Rdn rdnClone = ( Rdn ) rdn.clone();
rdn.clear();
rdn = new Rdn( "c=d" );
@@ -667,12 +670,12 @@ public class RdnTest
@Test
public void testUnescapeValueHexa()
{
- byte[] res = ( byte[] ) Rdn.unescapeValue("#fF");
+ byte[] res = ( byte[] ) Rdn.unescapeValue( "#fF" );
- assertEquals( "0xFF ", Strings.dumpBytes(res) );
+ assertEquals( "0xFF ", Strings.dumpBytes( res ) );
- res = ( byte[] ) Rdn.unescapeValue("#0123456789aBCDEF");
- assertEquals( "0x01 0x23 0x45 0x67 0x89 0xAB 0xCD 0xEF ", Strings.dumpBytes(res) );
+ res = ( byte[] ) Rdn.unescapeValue( "#0123456789aBCDEF" );
+ assertEquals( "0x01 0x23 0x45 0x67 0x89 0xAB 0xCD 0xEF ", Strings.dumpBytes( res ) );
}
@@ -681,7 +684,7 @@ public class RdnTest
{
try
{
- Rdn.unescapeValue("#fF1");
+ Rdn.unescapeValue( "#fF1" );
fail(); // Should not happen
}
catch ( IllegalArgumentException iae )
@@ -694,7 +697,7 @@ public class RdnTest
@Test
public void testUnescapeValueString()
{
- String res = ( String ) Rdn.unescapeValue("azerty");
+ String res = ( String ) Rdn.unescapeValue( "azerty" );
assertEquals( "azerty", res );
}
@@ -703,7 +706,7 @@ public class RdnTest
@Test
public void testUnescapeValueStringSpecial()
{
- String res = ( String ) Rdn.unescapeValue("\\\\\\#\\,\\+\\;\\<\\>\\=\\\"\\ ");
+ String res = ( String ) Rdn.unescapeValue( "\\\\\\#\\,\\+\\;\\<\\>\\=\\\"\\ " );
assertEquals( "\\#,+;<>=\" ", res );
}
@@ -712,7 +715,7 @@ public class RdnTest
@Test
public void testUnescapeValueStringWithSpaceInTheMiddle()
{
- String res = ( String ) Rdn.unescapeValue("a b");
+ String res = ( String ) Rdn.unescapeValue( "a b" );
assertEquals( "a b", res );
}
@@ -721,7 +724,7 @@ public class RdnTest
@Test
public void testUnescapeValueStringWithSpaceInAtTheBeginning()
{
- String res = ( String ) Rdn.unescapeValue("\\ a b");
+ String res = ( String ) Rdn.unescapeValue( "\\ a b" );
assertEquals( " a b", res );
}
@@ -730,34 +733,34 @@ public class RdnTest
@Test
public void testUnescapeValueStringWithSpaceInAtTheEnd()
{
- String res = ( String ) Rdn.unescapeValue("a b\\ ");
+ String res = ( String ) Rdn.unescapeValue( "a b\\ " );
assertEquals( "a b ", res );
}
-
-
+
+
@Test
public void testUnescapeValueStringWithPoundInTheMiddle()
{
- String res = ( String ) Rdn.unescapeValue("a#b");
+ String res = ( String ) Rdn.unescapeValue( "a#b" );
assertEquals( "a#b", res );
}
-
-
+
+
@Test
public void testUnescapeValueStringWithPoundAtTheEnd()
{
- String res = ( String ) Rdn.unescapeValue("ab#");
+ String res = ( String ) Rdn.unescapeValue( "ab#" );
assertEquals( "ab#", res );
}
-
-
+
+
@Test
public void testEscapeValueString()
{
- String res = Rdn.escapeValue(Strings.getBytesUtf8("azerty"));
+ String res = Rdn.escapeValue( Strings.getBytesUtf8( "azerty" ) );
assertEquals( "azerty", res );
}
@@ -766,7 +769,7 @@ public class RdnTest
@Test
public void testEscapeValueStringSpecial()
{
- String res = Rdn.escapeValue(Strings.getBytesUtf8("\\#,+;<>=\" "));
+ String res = Rdn.escapeValue( Strings.getBytesUtf8( "\\#,+;<>=\" " ) );
assertEquals( "\\\\#\\,\\+\\;\\<\\>\\=\\\"\\ ", res );
}
@@ -775,8 +778,8 @@ public class RdnTest
@Test
public void testEscapeValueNumeric()
{
- String res = Rdn.escapeValue(new byte[]
- {'-', 0x00, '-', 0x1F, '-', 0x7F, '-'});
+ String res = Rdn.escapeValue( new byte[]
+ { '-', 0x00, '-', 0x1F, '-', 0x7F, '-' } );
assertEquals( "-\\00-\\1F-\\7F-", res );
}
@@ -785,8 +788,8 @@ public class RdnTest
@Test
public void testEscapeValueMix()
{
- String res = Rdn.escapeValue(new byte[]
- {'\\', 0x00, '-', '+', '#', 0x7F, '-'});
+ String res = Rdn.escapeValue( new byte[]
+ { '\\', 0x00, '-', '+', '#', 0x7F, '-' } );
assertEquals( "\\\\\\00-\\+#\\7F-", res );
}
@@ -882,27 +885,27 @@ public class RdnTest
public void testEscapedAttributeValue()
{
// space doesn't need to be escaped in the middle of a string
- assertEquals( "a b", Rdn.escapeValue("a b") );
- assertEquals( "a b c", Rdn.escapeValue("a b c") );
- assertEquals( "a b c d", Rdn.escapeValue("a b c d") );
+ assertEquals( "a b", Rdn.escapeValue( "a b" ) );
+ assertEquals( "a b c", Rdn.escapeValue( "a b c" ) );
+ assertEquals( "a b c d", Rdn.escapeValue( "a b c d" ) );
// space must be escaped at the beginning and the end of a string
- assertEquals( "\\ a b", Rdn.escapeValue(" a b") );
- assertEquals( "a b\\ ", Rdn.escapeValue("a b ") );
- assertEquals( "\\ a b\\ ", Rdn.escapeValue(" a b ") );
- assertEquals( "\\ a b \\ ", Rdn.escapeValue(" a b ") );
+ assertEquals( "\\ a b", Rdn.escapeValue( " a b" ) );
+ assertEquals( "a b\\ ", Rdn.escapeValue( "a b " ) );
+ assertEquals( "\\ a b\\ ", Rdn.escapeValue( " a b " ) );
+ assertEquals( "\\ a b \\ ", Rdn.escapeValue( " a b " ) );
// hash doesn't need to be escaped in the middle and the end of a string
- assertEquals( "a#b", Rdn.escapeValue("a#b") );
- assertEquals( "a#b#", Rdn.escapeValue("a#b#") );
- assertEquals( "a#b#c", Rdn.escapeValue("a#b#c") );
- assertEquals( "a#b#c#", Rdn.escapeValue("a#b#c#") );
- assertEquals( "a#b#c#d", Rdn.escapeValue("a#b#c#d") );
- assertEquals( "a#b#c#d#", Rdn.escapeValue("a#b#c#d#") );
+ assertEquals( "a#b", Rdn.escapeValue( "a#b" ) );
+ assertEquals( "a#b#", Rdn.escapeValue( "a#b#" ) );
+ assertEquals( "a#b#c", Rdn.escapeValue( "a#b#c" ) );
+ assertEquals( "a#b#c#", Rdn.escapeValue( "a#b#c#" ) );
+ assertEquals( "a#b#c#d", Rdn.escapeValue( "a#b#c#d" ) );
+ assertEquals( "a#b#c#d#", Rdn.escapeValue( "a#b#c#d#" ) );
// hash must be escaped at the beginning of a string
- assertEquals( "\\#a#b", Rdn.escapeValue("#a#b") );
- assertEquals( "\\##a#b", Rdn.escapeValue("##a#b") );
+ assertEquals( "\\#a#b", Rdn.escapeValue( "#a#b" ) );
+ assertEquals( "\\##a#b", Rdn.escapeValue( "##a#b" ) );
}
@@ -928,7 +931,7 @@ public class RdnTest
byte[] data = baos.toByteArray();
in = new ObjectInputStream( new ByteArrayInputStream( data ) );
- Rdn rdn2 = (Rdn)in.readObject();
+ Rdn rdn2 = ( Rdn ) in.readObject();
assertEquals( rdn, rdn2 );
}
@@ -951,7 +954,7 @@ public class RdnTest
byte[] data = baos.toByteArray();
in = new ObjectInputStream( new ByteArrayInputStream( data ) );
- Rdn rdn2 = (Rdn)in.readObject();
+ Rdn rdn2 = ( Rdn ) in.readObject();
assertEquals( rdn, rdn2 );
}
@@ -976,7 +979,7 @@ public class RdnTest
byte[] data = baos.toByteArray();
in = new ObjectInputStream( new ByteArrayInputStream( data ) );
- Rdn rdn2 = (Rdn)in.readObject();
+ Rdn rdn2 = ( Rdn ) in.readObject();
assertEquals( rdn, rdn2 );
}
@@ -1001,7 +1004,7 @@ public class RdnTest
byte[] data = baos.toByteArray();
in = new ObjectInputStream( new ByteArrayInputStream( data ) );
- Rdn rdn2 = (Rdn)in.readObject();
+ Rdn rdn2 = ( Rdn ) in.readObject();
assertEquals( rdn, rdn2 );
}
@@ -1026,7 +1029,7 @@ public class RdnTest
byte[] data = baos.toByteArray();
in = new ObjectInputStream( new ByteArrayInputStream( data ) );
- Rdn rdn2 = (Rdn)in.readObject();
+ Rdn rdn2 = ( Rdn ) in.readObject();
assertEquals( rdn, rdn2 );
}
@@ -1051,7 +1054,7 @@ public class RdnTest
byte[] data = baos.toByteArray();
in = new ObjectInputStream( new ByteArrayInputStream( data ) );
- Rdn rdn2 = (Rdn)in.readObject();
+ Rdn rdn2 = ( Rdn ) in.readObject();
assertEquals( rdn, rdn2 );
}
@@ -1076,7 +1079,7 @@ public class RdnTest
byte[] data = baos.toByteArray();
in = new ObjectInputStream( new ByteArrayInputStream( data ) );
- Rdn rdn2 = (Rdn)in.readObject();
+ Rdn rdn2 = ( Rdn ) in.readObject();
assertEquals( rdn, rdn2 );
}
@@ -1102,7 +1105,7 @@ public class RdnTest
byte[] data = baos.toByteArray();
in = new ObjectInputStream( new ByteArrayInputStream( data ) );
- Rdn rdn2 = (Rdn)in.readObject();
+ Rdn rdn2 = ( Rdn ) in.readObject();
assertEquals( rdn, rdn2 );
}
@@ -1153,7 +1156,7 @@ public class RdnTest
// Use upper case attribute types to test if normalized types are used
// for comparison
Rdn rdn = new Rdn( " A = b + C = d" );
- Rdn clonedRdn = (Rdn) rdn.clone();
+ Rdn clonedRdn = ( Rdn ) rdn.clone();
assertTrue( rdn.equals( clonedRdn ) );
}
@@ -1180,11 +1183,11 @@ public class RdnTest
/**
* test the UpName method on a Rdn with more than one atav
*/
- @Test
+ @Test
public void testGetUpNameMultipleAtav() throws LdapException
{
Rdn rdn = new Rdn( " A = b + C = d " );
-
+
assertEquals( " A = b + C = d ", rdn.getName() );
}
@@ -1192,14 +1195,15 @@ public class RdnTest
/**
* test the iterator over a RDN
*/
- @Test
+ @Test
public void testIterator() throws LdapException
{
Rdn rdn = new Rdn( "cn=John + sn=Doe" );
-
- String[] expected = new String[]{ "cn=John ", " sn=Doe" };
+
+ String[] expected = new String[]
+ { "cn=John ", " sn=Doe" };
int i = 0;
-
+
for ( Ava ava : rdn )
{
assertEquals( expected[i], ava.toString() );
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/ObjectClassTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/ObjectClassTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/ObjectClassTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/ObjectClassTest.java Tue Jan 24 17:44:03 2012
@@ -30,6 +30,7 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Unit tests class ObjectClass.
*
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/SchemaUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/SchemaUtilsTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/SchemaUtilsTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/SchemaUtilsTest.java Tue Jan 24 17:44:03 2012
@@ -34,6 +34,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* The unit tests for methods on SchemaUtils.
*
@@ -49,7 +50,7 @@ public class SchemaUtilsTest
syntaxes[0] = new LdapSyntax( "1.3.6.1.4.1.1466.115.121.1.12", "Dn syntax", true );
syntaxes[1] = new LdapSyntax( "1.3.6.1.4.1.1466.115.121.1.15", "Directory String syntax", true );
syntaxes[2] = new LdapSyntax( "1.3.6.1.4.1.1466.115.121.1.58", "Substring assertion syntax", true );
-
+
return syntaxes;
}
@@ -57,7 +58,7 @@ public class SchemaUtilsTest
public static MatchingRule[] getMatchingRules()
{
MatchingRule[] mrs = new MatchingRule[3];
-
+
mrs[0] = new MatchingRule( "2.5.13.2" );
mrs[0].setSyntax( getSyntaxes()[1] );
mrs[0].addName( "caseIgnoreMatch" );
@@ -83,7 +84,7 @@ public class SchemaUtilsTest
ats[0] = new AttributeType( "2.5.4.41" );
ats[0].addName( "name" );
- ats[0].setSyntax( getSyntaxes()[1] );
+ ats[0].setSyntax( getSyntaxes()[1] );
ats[0].setSyntaxLength( 32768 );
ats[0].setEquality( getMatchingRules()[0] );
ats[0].setSubstring( getMatchingRules()[1] );
@@ -125,17 +126,18 @@ public class SchemaUtilsTest
@Test
public void testRenderQdescrs()
{
- assertEquals( "", SchemaUtils.renderQDescrs(new StringBuffer(), (List<String>) null).toString() );
- assertEquals( "", SchemaUtils.renderQDescrs( new StringBuffer(), Arrays.asList( new String[]
+ assertEquals( "", SchemaUtils.renderQDescrs( new StringBuffer(), ( List<String> ) null ).toString() );
+ assertEquals( "", SchemaUtils.renderQDescrs( new StringBuffer(), Arrays.asList( new String[]
{} ) ).toString() );
assertEquals( "'name1'", SchemaUtils.renderQDescrs( new StringBuffer(), Arrays.asList( new String[]
{ "name1" } ) ).toString() );
assertEquals( "( 'name1' 'name2' )", SchemaUtils.renderQDescrs( new StringBuffer(), Arrays.asList( new String[]
{ "name1", "name2" } ) ).toString() );
- assertEquals( "( 'name1' 'name2' 'name3' )", SchemaUtils.renderQDescrs( new StringBuffer(), Arrays.asList( new String[]
- { "name1", "name2", "name3" } ) ).toString() );
+ assertEquals( "( 'name1' 'name2' 'name3' )",
+ SchemaUtils.renderQDescrs( new StringBuffer(), Arrays.asList( new String[]
+ { "name1", "name2", "name3" } ) ).toString() );
- assertEquals( "", SchemaUtils.renderQDescrs( new StringBuffer(), (List<String>)null ).toString() );
+ assertEquals( "", SchemaUtils.renderQDescrs( new StringBuffer(), ( List<String> ) null ).toString() );
assertEquals( "", SchemaUtils.renderQDescrs( new StringBuffer(), Arrays.asList( new String[]
{} ) ).toString() );
@@ -146,7 +148,8 @@ public class SchemaUtilsTest
assertEquals( "( 'name1' 'name2' )", SchemaUtils.renderQDescrs( new StringBuffer(), Arrays.asList( new String[]
{ "name1", "name2" } ) ).toString() );
- assertEquals( "( 'name1' 'name2' 'name3' )", SchemaUtils.renderQDescrs( new StringBuffer(), Arrays.asList( new String[]
- { "name1", "name2", "name3" } ) ).toString() );
+ assertEquals( "( 'name1' 'name2' 'name3' )",
+ SchemaUtils.renderQDescrs( new StringBuffer(), Arrays.asList( new String[]
+ { "name1", "name2", "name3" } ) ).toString() );
}
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/SyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/SyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/SyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/SyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -31,6 +31,7 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Unit tests class SyntaxChecker.
*
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/UsageEnumTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/UsageEnumTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/UsageEnumTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/UsageEnumTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema;
+
import static org.junit.Assert.assertEquals;
import com.mycila.junit.concurrent.Concurrency;
@@ -27,6 +28,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* The unit tests for methods on UsageEnum.
*
@@ -44,7 +46,8 @@ public class UsageEnumTest
assertEquals( 2, UsageEnum.DISTRIBUTED_OPERATION.getValue() );
assertEquals( 3, UsageEnum.DSA_OPERATION.getValue() );
}
-
+
+
@Test
public void testGetUsage()
{
@@ -54,7 +57,8 @@ public class UsageEnumTest
assertEquals( UsageEnum.DSA_OPERATION, UsageEnum.getUsage( "dSAOperation" ) );
assertEquals( null, UsageEnum.getUsage( "azerty" ) );
}
-
+
+
@Test
public void testRenderer()
{
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/ByteArrayComparatorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/ByteArrayComparatorTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/ByteArrayComparatorTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/ByteArrayComparatorTest.java Tue Jan 24 17:44:03 2012
@@ -44,97 +44,109 @@ public class ByteArrayComparatorTest
assertEquals( 0, new ByteArrayComparator( null ).compare( null, null ) );
}
-
+
@Test
public void testB2Null()
{
assertEquals( 1, new ByteArrayComparator( null ).compare( new byte[0], null ) );
}
-
+
@Test
public void testB1Null()
{
assertEquals( -1, new ByteArrayComparator( null ).compare( null, new byte[0] ) );
}
-
+
@Test
public void testBothEmpty()
{
assertEquals( 0, new ByteArrayComparator( null ).compare( new byte[0], new byte[0] ) );
}
-
+
@Test
public void testBothEqualLengthOne()
{
assertEquals( 0, new ByteArrayComparator( null ).compare( new byte[1], new byte[1] ) );
}
-
+
@Test
public void testBothEqualLengthTen()
{
assertEquals( 0, new ByteArrayComparator( null ).compare( new byte[10], new byte[10] ) );
}
-
-
+
+
@Test
public void testB1PrefixOfB2()
{
- byte[] b1 = new byte[] { 0, 1, 2 };
- byte[] b2 = new byte[] { 0, 1, 2, 3 };
+ byte[] b1 = new byte[]
+ { 0, 1, 2 };
+ byte[] b2 = new byte[]
+ { 0, 1, 2, 3 };
assertEquals( -1, new ByteArrayComparator( null ).compare( b1, b2 ) );
}
-
-
+
+
@Test
public void testB2PrefixOfB1()
{
- byte[] b1 = new byte[] { 0, 1, 2, 3 };
- byte[] b2 = new byte[] { 0, 1, 2 };
+ byte[] b1 = new byte[]
+ { 0, 1, 2, 3 };
+ byte[] b2 = new byte[]
+ { 0, 1, 2 };
assertEquals( 1, new ByteArrayComparator( null ).compare( b1, b2 ) );
}
-
-
+
+
@Test
- public void testB1GreaterThanB2()
+ public void testB1GreaterThanB2()
{
- byte[] b1 = new byte[] { 0, 5 };
- byte[] b2 = new byte[] { 0, 1, 2 };
+ byte[] b1 = new byte[]
+ { 0, 5 };
+ byte[] b2 = new byte[]
+ { 0, 1, 2 };
assertEquals( 1, new ByteArrayComparator( null ).compare( b1, b2 ) );
}
@Test
- public void testB1GreaterThanB2SameLength()
+ public void testB1GreaterThanB2SameLength()
{
- byte[] b1 = new byte[] { 0, 5 };
- byte[] b2 = new byte[] { 0, 1 };
+ byte[] b1 = new byte[]
+ { 0, 5 };
+ byte[] b2 = new byte[]
+ { 0, 1 };
assertEquals( 1, new ByteArrayComparator( null ).compare( b1, b2 ) );
}
@Test
- public void testB2GreaterThanB1()
+ public void testB2GreaterThanB1()
{
- byte[] b1 = new byte[] { 0, 1, 2 };
- byte[] b2 = new byte[] { 0, 5 };
+ byte[] b1 = new byte[]
+ { 0, 1, 2 };
+ byte[] b2 = new byte[]
+ { 0, 5 };
assertEquals( -1, new ByteArrayComparator( null ).compare( b1, b2 ) );
}
@Test
- public void testB2GreaterThanB1SameLength()
+ public void testB2GreaterThanB1SameLength()
{
- byte[] b1 = new byte[] { 0, 1 };
- byte[] b2 = new byte[] { 0, 5 };
+ byte[] b1 = new byte[]
+ { 0, 1 };
+ byte[] b2 = new byte[]
+ { 0, 5 };
assertEquals( -1, new ByteArrayComparator( null ).compare( b1, b2 ) );
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/CsnComparatorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/CsnComparatorTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/CsnComparatorTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/CsnComparatorTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.comparators;
+
import static org.junit.Assert.assertEquals;
import com.mycila.junit.concurrent.Concurrency;
@@ -39,19 +40,20 @@ import org.junit.runner.RunWith;
public class CsnComparatorTest
{
private CsnComparator comparator;
-
+
+
@Before
public void init()
{
comparator = new CsnComparator( null );
}
-
-
+
+
@Test
public void testNullCSNs()
{
assertEquals( 0, comparator.compare( null, null ) );
-
+
Csn csn2 = new Csn( System.currentTimeMillis(), 1, 1, 1 );
assertEquals( -1, comparator.compare( null, csn2.toString() ) );
@@ -65,11 +67,11 @@ public class CsnComparatorTest
long t0 = System.currentTimeMillis();
Csn csn1 = new Csn( t0, 0, 0, 0 );
Csn csn2 = new Csn( t0, 0, 0, 0 );
-
+
assertEquals( 0, comparator.compare( csn1.toString(), csn2.toString() ) );
}
-
-
+
+
@Test
public void testDifferentTimeStampCSNs()
{
@@ -77,43 +79,43 @@ public class CsnComparatorTest
long t1 = System.currentTimeMillis() + 1000;
Csn csn1 = new Csn( t0, 0, 0, 0 );
Csn csn2 = new Csn( t1, 0, 0, 0 );
-
+
assertEquals( -1, comparator.compare( csn1.toString(), csn2.toString() ) );
assertEquals( 1, comparator.compare( csn2.toString(), csn1.toString() ) );
}
-
-
+
+
@Test
public void testDifferentChangeCountCSNs()
{
long t0 = System.currentTimeMillis();
Csn csn1 = new Csn( t0, 0, 0, 0 );
Csn csn2 = new Csn( t0, 1, 0, 0 );
-
+
assertEquals( -1, comparator.compare( csn1.toString(), csn2.toString() ) );
assertEquals( 1, comparator.compare( csn2.toString(), csn1.toString() ) );
}
-
-
+
+
@Test
public void testDifferentReplicaIdCSNs()
{
long t0 = System.currentTimeMillis();
Csn csn1 = new Csn( t0, 0, 0, 0 );
Csn csn2 = new Csn( t0, 0, 1, 0 );
-
+
assertEquals( -1, comparator.compare( csn1.toString(), csn2.toString() ) );
assertEquals( 1, comparator.compare( csn2.toString(), csn1.toString() ) );
}
-
-
+
+
@Test
public void testDifferentOperationNumberCSNs()
{
long t0 = System.currentTimeMillis();
Csn csn1 = new Csn( t0, 0, 0, 0 );
Csn csn2 = new Csn( t0, 0, 0, 1 );
-
+
assertEquals( -1, comparator.compare( csn1.toString(), csn2.toString() ) );
assertEquals( 1, comparator.compare( csn2.toString(), csn1.toString() ) );
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/CsnSidComparatorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/CsnSidComparatorTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/CsnSidComparatorTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/CsnSidComparatorTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.comparators;
+
import static org.junit.Assert.assertEquals;
import com.mycila.junit.concurrent.Concurrency;
@@ -39,19 +40,20 @@ import org.junit.runner.RunWith;
public class CsnSidComparatorTest
{
private CsnSidComparator comparator;
-
+
+
@Before
public void init()
{
comparator = new CsnSidComparator( null );
}
-
-
+
+
@Test
public void testNullSids()
{
assertEquals( 0, comparator.compare( null, null ) );
-
+
assertEquals( -1, comparator.compare( null, "000" ) );
assertEquals( 1, comparator.compare( "000", null ) );
@@ -65,9 +67,8 @@ public class CsnSidComparatorTest
assertEquals( 0, comparator.compare( "000", "0" ) );
assertEquals( 0, comparator.compare( "fff", "fff" ) );
}
-
-
-
+
+
@Test
public void testDifferentSids()
{
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/ObjectIdentifierFirstComponentComparatorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/ObjectIdentifierFirstComponentComparatorTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/ObjectIdentifierFirstComponentComparatorTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/ObjectIdentifierFirstComponentComparatorTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.comparators;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotSame;
@@ -40,21 +41,22 @@ import org.junit.runner.RunWith;
public class ObjectIdentifierFirstComponentComparatorTest
{
private ObjectIdentifierFirstComponentComparator comparator;
-
+
+
@Before
public void init()
{
comparator = new ObjectIdentifierFirstComponentComparator( null );
}
-
-
+
+
@Test
public void testNullObjectIdentifiers()
{
assertEquals( 0, comparator.compare( null, null ) );
-
+
String c2 = "( 1.1 FQCN org.apache.directory.SimpleComparator BYTECODE ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789==== )";
-
+
assertEquals( -1, comparator.compare( null, c2 ) );
assertEquals( -1, comparator.compare( c2, null ) );
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/TelephoneNumberComparatorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/TelephoneNumberComparatorTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/TelephoneNumberComparatorTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/comparators/TelephoneNumberComparatorTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.comparators;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -40,22 +41,23 @@ import org.junit.runner.RunWith;
public class TelephoneNumberComparatorTest
{
private TelephoneNumberComparator comparator;
-
+
+
@Before
public void init()
{
comparator = new TelephoneNumberComparator( null );
}
-
-
+
+
@Test
public void testNullTelephoneNumbers()
{
String tel1 = null;
String tel2 = null;
-
+
assertEquals( 0, comparator.compare( tel1, tel2 ) );
-
+
tel2 = "abc";
assertEquals( -1, comparator.compare( tel1, tel2 ) );
@@ -69,38 +71,38 @@ public class TelephoneNumberComparatorTe
{
String tel1 = "";
String tel2 = "";
-
+
assertEquals( 0, comparator.compare( tel1, tel2 ) );
-
+
tel2 = "abc";
assertTrue( comparator.compare( tel1, tel2 ) < 0 );
String tel3 = "";
assertTrue( comparator.compare( tel2, tel3 ) > 0 );
}
-
-
+
+
@Test
public void testSimpleTelephoneNumbers()
{
String tel1 = "01 02 03 04 05";
String tel2 = "01 02 03 04 05";
-
+
assertEquals( 0, comparator.compare( tel1, tel2 ) );
-
+
tel2 = "0102030405";
assertEquals( 0, comparator.compare( tel1, tel2 ) );
}
-
-
+
+
@Test
public void testComplexTelephoneNumbers()
{
String tel1 = " + 33 1 01-02-03-04-05 ";
String tel2 = "+3310102030405";
-
+
assertEquals( 0, comparator.compare( tel1, tel2 ) );
-
+
tel1 = "1-801-555-1212";
tel2 = "18015551212";
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/normalizers/BooleanNormalizerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/normalizers/BooleanNormalizerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/normalizers/BooleanNormalizerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/normalizers/BooleanNormalizerTest.java Tue Jan 24 17:44:03 2012
@@ -48,7 +48,7 @@ public class BooleanNormalizerTest
@Test
public void testNormalizeNullValue() throws Exception
{
- assertNull( normalizer.normalize( (Value<?>)null ) );
+ assertNull( normalizer.normalize( ( Value<?> ) null ) );
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/normalizers/TelephoneNumberNormalizerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/normalizers/TelephoneNumberNormalizerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/normalizers/TelephoneNumberNormalizerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/normalizers/TelephoneNumberNormalizerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.normalizers;
+
import com.mycila.junit.concurrent.Concurrency;
import com.mycila.junit.concurrent.ConcurrentJunitRunner;
import org.apache.directory.shared.ldap.model.exception.LdapException;
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/parsers/OpenLdapSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/parsers/OpenLdapSchemaParserTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/parsers/OpenLdapSchemaParserTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/parsers/OpenLdapSchemaParserTest.java Tue Jan 24 17:44:03 2012
@@ -55,6 +55,7 @@ public class OpenLdapSchemaParserTest
{
private OpenLdapSchemaParser parser;
+
@Before
public void setUp() throws Exception
{
@@ -106,9 +107,9 @@ public class OpenLdapSchemaParserTest
@Test
public void testSimpleAttributeTypeParse() throws Exception
{
- String attributeTypeData = "# adding a comment \n"
+ String attributeTypeData = "# adding a comment \n"
+ "attributetype ( 2.5.4.2 NAME 'knowledgeInformation'\n"
- + " DESC 'RFC2256: knowledge information'\n"
+ + " DESC 'RFC2256: knowledge information'\n"
+ " EQUALITY caseIgnoreMatch\n"
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )";
parser.parse( attributeTypeData );
@@ -128,9 +129,9 @@ public class OpenLdapSchemaParserTest
@Test
public void testAttributeTypeParseWithDescQuotes() throws Exception
{
- String attributeTypeData = "# adding a comment \n"
+ String attributeTypeData = "# adding a comment \n"
+ "attributetype ( 2.5.4.2 NAME 'knowledgeInformation'\n"
- + " DESC 'RFC2256: \"knowledge\" information'\n"
+ + " DESC 'RFC2256: \"knowledge\" information'\n"
+ " EQUALITY caseIgnoreMatch\n"
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )";
parser.parse( attributeTypeData );
@@ -178,7 +179,7 @@ public class OpenLdapSchemaParserTest
{
String attributeTypeData = "# adding a comment \n"
+ "attributetype ( 2.5.4.2 NAME ( 'knowledgeInformation' 'asdf' ) \n"
- + " DESC 'RFC2256: knowledge information'\n"
+ + " DESC 'RFC2256: knowledge information'\n"
+ " EQUALITY caseIgnoreMatch\n"
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )";
parser.parse( attributeTypeData );
@@ -211,9 +212,9 @@ public class OpenLdapSchemaParserTest
@Test
public void testObjectClassParse() throws Exception
{
- String objectClassData = "objectclass ( 2.5.6.6 NAME 'person'\n"
+ String objectClassData = "objectclass ( 2.5.6.6 NAME 'person'\n"
+ " DESC 'RFC2256: a person'\n"
- + " SUP top STRUCTURAL\n"
+ + " SUP top STRUCTURAL\n"
+ " MUST ( sn $ cn )\n"
+ " MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) )";
parser.parse( objectClassData );
@@ -226,23 +227,21 @@ public class OpenLdapSchemaParserTest
assertEquals( "person", objectClass.getName() );
assertEquals( "RFC2256: a person", objectClass.getDescription() );
assertEquals( ObjectClassTypeEnum.STRUCTURAL, objectClass.getType() );
- assertEquals( "sn", objectClass.getMustAttributeTypeOids().get(0) );
- assertEquals( "cn", objectClass.getMustAttributeTypeOids().get(1) );
- assertEquals( "userPassword", objectClass.getMayAttributeTypeOids().get(0) );
- assertEquals( "telephoneNumber", objectClass.getMayAttributeTypeOids().get(1) );
- assertEquals( "seeAlso", objectClass.getMayAttributeTypeOids().get(2) );
- assertEquals( "description", objectClass.getMayAttributeTypeOids().get(3) );
+ assertEquals( "sn", objectClass.getMustAttributeTypeOids().get( 0 ) );
+ assertEquals( "cn", objectClass.getMustAttributeTypeOids().get( 1 ) );
+ assertEquals( "userPassword", objectClass.getMayAttributeTypeOids().get( 0 ) );
+ assertEquals( "telephoneNumber", objectClass.getMayAttributeTypeOids().get( 1 ) );
+ assertEquals( "seeAlso", objectClass.getMayAttributeTypeOids().get( 2 ) );
+ assertEquals( "description", objectClass.getMayAttributeTypeOids().get( 3 ) );
}
-
-
@Test
public void testObjectClassWithExtensionsParse() throws Exception
{
- String objectClassData = "objectclass ( 2.5.6.6 NAME 'person'\n"
+ String objectClassData = "objectclass ( 2.5.6.6 NAME 'person'\n"
+ " DESC 'RFC2256: a person'\n"
- + " SUP top STRUCTURAL\n"
+ + " SUP top STRUCTURAL\n"
+ " MUST ( sn $ cn )\n"
+ " MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) \n"
+ " X-extension 'test' X-otherExtension ( 'test1' 'test2' ) )";
@@ -256,30 +255,30 @@ public class OpenLdapSchemaParserTest
assertEquals( "person", objectClass.getName() );
assertEquals( "RFC2256: a person", objectClass.getDescription() );
assertEquals( ObjectClassTypeEnum.STRUCTURAL, objectClass.getType() );
- assertEquals( "sn", objectClass.getMustAttributeTypeOids().get(0) );
- assertEquals( "cn", objectClass.getMustAttributeTypeOids().get(1) );
- assertEquals( "userPassword", objectClass.getMayAttributeTypeOids().get(0) );
- assertEquals( "telephoneNumber", objectClass.getMayAttributeTypeOids().get(1) );
- assertEquals( "seeAlso", objectClass.getMayAttributeTypeOids().get(2) );
- assertEquals( "description", objectClass.getMayAttributeTypeOids().get(3) );
+ assertEquals( "sn", objectClass.getMustAttributeTypeOids().get( 0 ) );
+ assertEquals( "cn", objectClass.getMustAttributeTypeOids().get( 1 ) );
+ assertEquals( "userPassword", objectClass.getMayAttributeTypeOids().get( 0 ) );
+ assertEquals( "telephoneNumber", objectClass.getMayAttributeTypeOids().get( 1 ) );
+ assertEquals( "seeAlso", objectClass.getMayAttributeTypeOids().get( 2 ) );
+ assertEquals( "description", objectClass.getMayAttributeTypeOids().get( 3 ) );
Map<String, List<String>> extensions = objectClass.getExtensions();
assertNotNull( extensions );
-
+
List<String> ext1 = extensions.get( "X-extension" );
assertNotNull( ext1 );
assertEquals( 1, ext1.size() );
assertTrue( ext1.contains( "test" ) );
-
+
List<String> ext2 = extensions.get( "X-otherExtension" );
assertNotNull( ext2 );
assertEquals( 2, ext2.size() );
assertTrue( ext2.contains( "test1" ) );
assertTrue( ext2.contains( "test2" ) );
-
+
}
-
+
@Test
public void testObjectClassMultipleNames() throws Exception
{
@@ -300,29 +299,29 @@ public class OpenLdapSchemaParserTest
assertNotNull( objectClass );
assertEquals( "0.9.2342.19200300.100.4.4", objectClass.getOid() );
assertEquals( "pilotPerson", objectClass.getName() );
- assertEquals( "newPilotPerson", objectClass.getNames().get(1) );
+ assertEquals( "newPilotPerson", objectClass.getNames().get( 1 ) );
assertEquals( ObjectClassTypeEnum.STRUCTURAL, objectClass.getType() );
- assertEquals( "person", objectClass.getSuperiorOids().get(0) );
+ assertEquals( "person", objectClass.getSuperiorOids().get( 0 ) );
- assertEquals( "userid", objectClass.getMayAttributeTypeOids().get(0) );
- assertEquals( "textEncodedORAddress", objectClass.getMayAttributeTypeOids().get(1) );
- assertEquals( "rfc822Mailbox", objectClass.getMayAttributeTypeOids().get(2) );
- assertEquals( "favouriteDrink", objectClass.getMayAttributeTypeOids().get(3) );
- assertEquals( "roomNumber", objectClass.getMayAttributeTypeOids().get(4) );
- assertEquals( "userClass", objectClass.getMayAttributeTypeOids().get(5) );
- assertEquals( "homeTelephoneNumber", objectClass.getMayAttributeTypeOids().get(6) );
- assertEquals( "homePostalAddress", objectClass.getMayAttributeTypeOids().get(7) );
- assertEquals( "secretary", objectClass.getMayAttributeTypeOids().get(8) );
- assertEquals( "personalTitle", objectClass.getMayAttributeTypeOids().get(9) );
- assertEquals( "preferredDeliveryMethod", objectClass.getMayAttributeTypeOids().get(10) );
- assertEquals( "businessCategory", objectClass.getMayAttributeTypeOids().get(11) );
- assertEquals( "janetMailbox", objectClass.getMayAttributeTypeOids().get(12) );
- assertEquals( "otherMailbox", objectClass.getMayAttributeTypeOids().get(13) );
- assertEquals( "mobileTelephoneNumber", objectClass.getMayAttributeTypeOids().get(14) );
- assertEquals( "pagerTelephoneNumber", objectClass.getMayAttributeTypeOids().get(15) );
- assertEquals( "organizationalStatus", objectClass.getMayAttributeTypeOids().get(16) );
- assertEquals( "mailPreferenceOption", objectClass.getMayAttributeTypeOids().get(17) );
- assertEquals( "personalSignature", objectClass.getMayAttributeTypeOids().get(18) );
+ assertEquals( "userid", objectClass.getMayAttributeTypeOids().get( 0 ) );
+ assertEquals( "textEncodedORAddress", objectClass.getMayAttributeTypeOids().get( 1 ) );
+ assertEquals( "rfc822Mailbox", objectClass.getMayAttributeTypeOids().get( 2 ) );
+ assertEquals( "favouriteDrink", objectClass.getMayAttributeTypeOids().get( 3 ) );
+ assertEquals( "roomNumber", objectClass.getMayAttributeTypeOids().get( 4 ) );
+ assertEquals( "userClass", objectClass.getMayAttributeTypeOids().get( 5 ) );
+ assertEquals( "homeTelephoneNumber", objectClass.getMayAttributeTypeOids().get( 6 ) );
+ assertEquals( "homePostalAddress", objectClass.getMayAttributeTypeOids().get( 7 ) );
+ assertEquals( "secretary", objectClass.getMayAttributeTypeOids().get( 8 ) );
+ assertEquals( "personalTitle", objectClass.getMayAttributeTypeOids().get( 9 ) );
+ assertEquals( "preferredDeliveryMethod", objectClass.getMayAttributeTypeOids().get( 10 ) );
+ assertEquals( "businessCategory", objectClass.getMayAttributeTypeOids().get( 11 ) );
+ assertEquals( "janetMailbox", objectClass.getMayAttributeTypeOids().get( 12 ) );
+ assertEquals( "otherMailbox", objectClass.getMayAttributeTypeOids().get( 13 ) );
+ assertEquals( "mobileTelephoneNumber", objectClass.getMayAttributeTypeOids().get( 14 ) );
+ assertEquals( "pagerTelephoneNumber", objectClass.getMayAttributeTypeOids().get( 15 ) );
+ assertEquals( "organizationalStatus", objectClass.getMayAttributeTypeOids().get( 16 ) );
+ assertEquals( "mailPreferenceOption", objectClass.getMayAttributeTypeOids().get( 17 ) );
+ assertEquals( "personalSignature", objectClass.getMayAttributeTypeOids().get( 18 ) );
}
@@ -417,11 +416,11 @@ public class OpenLdapSchemaParserTest
fail( "object class 'groupOfURLs' or 'dgIdentityAux' expected" );
}
}
-
+
for ( AttributeType attributeType : attributeTypes )
{
List<String> asList = attributeType.getNames();
-
+
if ( asList.contains( "memberURL" ) )
{
assertEquals( "2.16.840.1.113730.3.1.198", attributeType.getOid() );
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/registries/AttributeTypeRegistryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/registries/AttributeTypeRegistryTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/registries/AttributeTypeRegistryTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/registries/AttributeTypeRegistryTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.registries;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -45,21 +46,22 @@ import org.junit.runner.RunWith;
public class AttributeTypeRegistryTest
{
AttributeTypeRegistry atRegistry;
-
+
+
@Before
public void setup()
{
atRegistry = new DefaultAttributeTypeRegistry();
}
-
-
+
+
@Test
public void testUnregister() throws LdapException
{
AttributeType at0 = new AttributeType( "1.1" );
at0.addName( "t", "test", "Test", "T" );
atRegistry.register( at0 );
-
+
atRegistry.unregister( "1.1" );
assertFalse( atRegistry.contains( "1.1" ) );
assertFalse( atRegistry.contains( "t" ) );
@@ -76,21 +78,21 @@ public class AttributeTypeRegistryTest
assertTrue( true );
}
}
-
-
+
+
@Test
public void testRegister() throws LdapException
{
AttributeType at0 = new AttributeType( "1.1" );
at0.addName( "t", "test", "Test", "T" );
atRegistry.register( at0 );
-
+
assertTrue( atRegistry.contains( "1.1" ) );
assertTrue( atRegistry.contains( "t" ) );
assertTrue( atRegistry.contains( "T" ) );
assertTrue( atRegistry.contains( "tEsT" ) );
assertEquals( "1.1", atRegistry.getOidByName( "T" ) );
-
+
try
{
atRegistry.register( at0 );
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/registries/OidRegistryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/registries/OidRegistryTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/registries/OidRegistryTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/registries/OidRegistryTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.registries;
+
import com.mycila.junit.concurrent.Concurrency;
import com.mycila.junit.concurrent.ConcurrentJunitRunner;
import org.junit.Test;
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/registries/RegistriesTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/registries/RegistriesTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/registries/RegistriesTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/registries/RegistriesTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.registries;
+
import com.mycila.junit.concurrent.Concurrency;
import com.mycila.junit.concurrent.ConcurrentJunitRunner;
import org.junit.Test;
@@ -37,6 +38,6 @@ public class RegistriesTest
@Test
public void testClone()
{
-
+
}
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/AccessPointSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/AccessPointSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/AccessPointSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/AccessPointSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.syntaxes;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -28,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for AccessPointSyntaxChecker.
*
@@ -39,6 +41,7 @@ public class AccessPointSyntaxCheckerTes
{
AccessPointSyntaxChecker checker = new AccessPointSyntaxChecker();
+
@Test
public void testNullString()
{
@@ -52,17 +55,19 @@ public class AccessPointSyntaxCheckerTes
assertTrue( checker.isValidSyntax( "" ) );
}
-
+
@Test
public void testOid()
{
assertEquals( "1.3.6.1.4.1.1466.115.121.1.2", checker.getOid() );
}
+
@Test
public void testCorrectCase()
{
assertTrue( checker.isValidSyntax( "FALSE" ) );
- assertTrue( checker.isValidSyntax( new byte[]{0x01, (byte)0xFF} ) );
+ assertTrue( checker.isValidSyntax( new byte[]
+ { 0x01, ( byte ) 0xFF } ) );
}
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/AttributeTypeDescriptionSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/AttributeTypeDescriptionSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/AttributeTypeDescriptionSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/AttributeTypeDescriptionSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -43,32 +43,43 @@ public class AttributeTypeDescriptionSyn
{
private AttributeTypeDescriptionSyntaxChecker checker = new AttributeTypeDescriptionSyntaxChecker();
+
@Test
public void testValid()
{
assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name )" ) );
- assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )" ) );
- assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )" ) );
- assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name )" ) );
- assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name EQUALITY caseIgnoreMatch )" ) );
- assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch )" ) );
- assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )" ) );
- assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications )" ) );
+ assertTrue( checker
+ .isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )" ) );
+ assertTrue( checker
+ .isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )" ) );
+ assertTrue( checker
+ .isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name )" ) );
+ assertTrue( checker
+ .isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name EQUALITY caseIgnoreMatch )" ) );
+ assertTrue( checker
+ .isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch )" ) );
+ assertTrue( checker
+ .isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )" ) );
+ assertTrue( checker
+ .isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications )" ) );
assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME cn SUP name )" ) );
assertTrue( checker.isValidSyntax( "( 2.5.4.3 name ( 'cn' 'commonName' ) sup name )" ) );
// spaces
assertTrue( checker.isValidSyntax( "(2.5.4.3 SUP name)" ) );
- assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME ('cn' 'commonName') SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )" ) );
-
+ assertTrue( checker
+ .isValidSyntax( "( 2.5.4.3 NAME ('cn' 'commonName') SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )" ) );
+
// COLLECTIVE requires usage userApplications
assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name COLLECTIVE )" ) );
assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name COLLECTIVE USAGE userApplications )" ) );
// NO-USER-MODIFICATION requires an operational usage.
assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name NO-USER-MODIFICATION USAGE dSAOperation )" ) );
- assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name NO-USER-MODIFICATION USAGE directoryOperation )" ) );
- assertTrue( checker.isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name NO-USER-MODIFICATION USAGE distributedOperation )" ) );
+ assertTrue( checker
+ .isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name NO-USER-MODIFICATION USAGE directoryOperation )" ) );
+ assertTrue( checker
+ .isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name NO-USER-MODIFICATION USAGE distributedOperation )" ) );
}
@@ -77,10 +88,10 @@ public class AttributeTypeDescriptionSyn
{
// null
assertFalse( checker.isValidSyntax( null ) );
-
+
// empty
assertFalse( checker.isValidSyntax( "" ) );
-
+
// missing/invalid OID
assertFalse( checker.isValidSyntax( "()" ) );
assertFalse( checker.isValidSyntax( "( )" ) );
@@ -95,21 +106,26 @@ public class AttributeTypeDescriptionSyn
assertFalse( checker.isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name" ) );
// SYNTAX or SUP must be contained
- assertFalse( checker.isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' )" ) );
-
+ assertFalse( checker
+ .isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' )" ) );
+
// COLLECTIVE requires usage userApplications
assertFalse( checker.isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name COLLECTIVE USAGE dSAOperation)" ) );
assertFalse( checker.isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name COLLECTIVE USAGE directoryOperation )" ) );
assertFalse( checker.isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name COLLECTIVE USAGE distributedOperation )" ) );
-
+
// NO-USER-MODIFICATION requires an operational usage.
assertFalse( checker.isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name NO-USER-MODIFICATION )" ) );
- assertFalse( checker.isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name NO-USER-MODIFICATION USAGE userApplications )" ) );
+ assertFalse( checker
+ .isValidSyntax( "( 2.5.4.3 NAME 'cn' SUP name NO-USER-MODIFICATION USAGE userApplications )" ) );
// invalid characters
- assertFalse( checker.isValidSyntax( "( 2.5.4.3 NAME ( 'cn#' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications )" ) );
- assertFalse( checker.isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'common_name' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications )" ) );
- assertFalse( checker.isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP na=me EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications )" ) );
+ assertFalse( checker
+ .isValidSyntax( "( 2.5.4.3 NAME ( 'cn#' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications )" ) );
+ assertFalse( checker
+ .isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'common_name' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP name EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications )" ) );
+ assertFalse( checker
+ .isValidSyntax( "( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'RFC2256: common name(s) for which the entity is known by' SUP na=me EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications )" ) );
}
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/AudioSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/AudioSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/AudioSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/AudioSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.syntaxes;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -28,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for AudioSyntaxChecker.
*
@@ -53,16 +55,19 @@ public class AudioSyntaxCheckerTest
assertTrue( checker.isValidSyntax( "" ) );
}
+
@Test
public void testOid()
{
assertEquals( "1.3.6.1.4.1.1466.115.121.1.4", checker.getOid() );
}
+
@Test
public void testCorrectCase()
{
assertTrue( checker.isValidSyntax( "FALSE" ) );
- assertTrue( checker.isValidSyntax( new byte[]{0x01, (byte)0xFF} ) );
+ assertTrue( checker.isValidSyntax( new byte[]
+ { 0x01, ( byte ) 0xFF } ) );
}
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/BinarySyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/BinarySyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/BinarySyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/BinarySyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.syntaxes;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -28,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for BinarySyntaxChecker.
*
@@ -53,16 +55,19 @@ public class BinarySyntaxCheckerTest
assertTrue( checker.isValidSyntax( "" ) );
}
+
@Test
public void testOid()
{
assertEquals( "1.3.6.1.4.1.1466.115.121.1.5", checker.getOid() );
}
+
@Test
public void testCorrectCase()
{
assertTrue( checker.isValidSyntax( "FALSE" ) );
- assertTrue( checker.isValidSyntax( new byte[]{0x01, (byte)0xFF} ) );
+ assertTrue( checker.isValidSyntax( new byte[]
+ { 0x01, ( byte ) 0xFF } ) );
}
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/BitStringSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/BitStringSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/BitStringSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/BitStringSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -29,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for BitStringSyntaxChecker.
*
@@ -63,8 +64,8 @@ public class BitStringSyntaxCheckerTest
assertFalse( checker.isValidSyntax( "1" ) );
assertFalse( checker.isValidSyntax( "B" ) );
}
-
-
+
+
@Test
public void testWrongCase()
{
@@ -76,8 +77,8 @@ public class BitStringSyntaxCheckerTest
assertFalse( checker.isValidSyntax( "'11200'B" ) );
assertFalse( checker.isValidSyntax( "'1100'b" ) );
}
-
-
+
+
@Test
public void testCorrectCase()
{
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/BooleanSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/BooleanSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/BooleanSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/BooleanSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.syntaxes;
+
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -28,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for BooleanSyntaxChecker.
*
@@ -62,16 +64,16 @@ public class BooleanSyntaxCheckerTest
assertFalse( checker.isValidSyntax( "t" ) );
assertFalse( checker.isValidSyntax( "T" ) );
}
-
-
+
+
@Test
public void testWrongValue()
{
assertFalse( checker.isValidSyntax( "abc" ) );
assertFalse( checker.isValidSyntax( "123" ) );
}
-
-
+
+
@Test
public void testMixedCase()
{
@@ -80,8 +82,8 @@ public class BooleanSyntaxCheckerTest
assertTrue( checker.isValidSyntax( "false" ) );
assertTrue( checker.isValidSyntax( "true" ) );
}
-
-
+
+
@Test
public void testUpperCase()
{
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CertificateListSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CertificateListSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CertificateListSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CertificateListSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.syntaxes;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -28,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for CertificateListSyntaxChecker.
*
@@ -53,16 +55,19 @@ public class CertificateListSyntaxChecke
assertTrue( checker.isValidSyntax( "" ) );
}
+
@Test
public void testOid()
{
assertEquals( "1.3.6.1.4.1.1466.115.121.1.9", checker.getOid() );
}
+
@Test
public void testCorrectCase()
{
assertTrue( checker.isValidSyntax( "FALSE" ) );
- assertTrue( checker.isValidSyntax( new byte[]{0x01, (byte)0xFF} ) );
+ assertTrue( checker.isValidSyntax( new byte[]
+ { 0x01, ( byte ) 0xFF } ) );
}
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CertificatePairSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CertificatePairSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CertificatePairSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CertificatePairSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.syntaxes;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -28,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for CertificatePairSyntaxChecker.
*
@@ -53,16 +55,19 @@ public class CertificatePairSyntaxChecke
assertTrue( checker.isValidSyntax( "" ) );
}
+
@Test
public void testOid()
{
assertEquals( "1.3.6.1.4.1.1466.115.121.1.10", checker.getOid() );
}
+
@Test
public void testCorrectCase()
{
assertTrue( checker.isValidSyntax( "FALSE" ) );
- assertTrue( checker.isValidSyntax( new byte[]{0x01, (byte)0xFF} ) );
+ assertTrue( checker.isValidSyntax( new byte[]
+ { 0x01, ( byte ) 0xFF } ) );
}
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CertificateSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CertificateSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CertificateSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CertificateSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.syntaxes;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -28,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for CertificateSyntaxChecker.
*
@@ -53,16 +55,19 @@ public class CertificateSyntaxCheckerTes
assertTrue( checker.isValidSyntax( "" ) );
}
+
@Test
public void testOid()
{
assertEquals( "1.3.6.1.4.1.1466.115.121.1.8", checker.getOid() );
}
+
@Test
public void testCorrectCase()
{
assertTrue( checker.isValidSyntax( "FALSE" ) );
- assertTrue( checker.isValidSyntax( new byte[]{0x01, (byte)0xFF} ) );
+ assertTrue( checker.isValidSyntax( new byte[]
+ { 0x01, ( byte ) 0xFF } ) );
}
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CountrySyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CountrySyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CountrySyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CountrySyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -29,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for BitStringSyntaxChecker.
*
@@ -63,8 +64,8 @@ public class CountrySyntaxCheckerTest
assertFalse( checker.isValidSyntax( "1" ) );
assertFalse( checker.isValidSyntax( "B" ) );
}
-
-
+
+
@Test
public void testCorrectCase()
{
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CsnSidSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CsnSidSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CsnSidSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CsnSidSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.syntaxes;
+
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -28,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for CsnSidSyntaxChecker.
*
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CsnSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CsnSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CsnSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/CsnSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.syntaxes;
+
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -28,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for CsnSyntaxChecker.
*
@@ -52,8 +54,8 @@ public class CsnSyntaxCheckerTest
{
assertFalse( checker.isValidSyntax( "" ) );
}
-
-
+
+
/**
* Test that a replicaId not being an integer between 000 and fff
* is seen as invalid
@@ -69,8 +71,8 @@ public class CsnSyntaxCheckerTest
assertFalse( checker.isValidSyntax( "20090602120000.100000Z#000000#0 0#000000" ) );
assertFalse( checker.isValidSyntax( "20090602120000.100000Z#000000# #000000" ) );
}
-
-
+
+
/**
* Test that a replicaId is a valid number between 000 and fff
*/
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DITContentRuleDescriptionSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DITContentRuleDescriptionSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DITContentRuleDescriptionSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DITContentRuleDescriptionSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -29,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for DITContentRuleDescriptionSyntaxChecker.
*
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DITStructureRuleDescriptionSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DITStructureRuleDescriptionSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DITStructureRuleDescriptionSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DITStructureRuleDescriptionSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -29,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for DITStructureRuleDescriptionSyntaxChecker.
*
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DLSubmitPermissionSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DLSubmitPermissionSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DLSubmitPermissionSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DLSubmitPermissionSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.syntaxes;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -28,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for DLSubmitPermissionSyntaxChecker.
*
@@ -53,16 +55,19 @@ public class DLSubmitPermissionSyntaxChe
assertTrue( checker.isValidSyntax( "" ) );
}
+
@Test
public void testOid()
{
assertEquals( "1.3.6.1.4.1.1466.115.121.1.18", checker.getOid() );
}
+
@Test
public void testCorrectCase()
{
assertTrue( checker.isValidSyntax( "FALSE" ) );
- assertTrue( checker.isValidSyntax( new byte[]{0x01, (byte)0xFF} ) );
+ assertTrue( checker.isValidSyntax( new byte[]
+ { 0x01, ( byte ) 0xFF } ) );
}
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DNSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DNSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DNSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DNSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -29,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for DNSyntaxChecker.
*
@@ -63,8 +64,8 @@ public class DNSyntaxCheckerTest
assertFalse( checker.isValidSyntax( "1" ) );
assertFalse( checker.isValidSyntax( "B" ) );
}
-
-
+
+
@Test
public void testWrongDN()
{
@@ -73,8 +74,8 @@ public class DNSyntaxCheckerTest
assertFalse( checker.isValidSyntax( "a=b+" ) );
assertFalse( checker.isValidSyntax( "a=b,c=d," ) );
}
-
-
+
+
@Test
public void testCorrectDN()
{
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DSAQualitySyntaxSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DSAQualitySyntaxSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DSAQualitySyntaxSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DSAQualitySyntaxSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.syntaxes;
+
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -28,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for DSAQualitySyntaxSyntaxChecker.
*
@@ -63,8 +65,8 @@ public class DSAQualitySyntaxSyntaxCheck
assertFalse( checker.isValidSyntax( "DEFUNCT$desc" ) );
assertFalse( checker.isValidSyntax( "EXPERIMENTAL#test @ bad <desc>" ) );
}
-
-
+
+
@Test
public void testCorrectCase()
{
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DSETypeSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DSETypeSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DSETypeSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DSETypeSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.syntaxes;
+
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -28,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for DSETypeSyntaxChecker.
*
@@ -68,15 +70,15 @@ public class DSETypeSyntaxCheckerTest
assertFalse( checker.isValidSyntax( "(sa$ )" ) );
assertFalse( checker.isValidSyntax( "( sa $ sa )" ) );
}
-
-
+
+
@Test
public void testCorrectCase()
{
assertTrue( checker.isValidSyntax( "(sa)" ) );
assertTrue( checker.isValidSyntax( "( sa )" ) );
assertTrue( checker.isValidSyntax( "( root $ glue $ cp $ entry $ alias $ subr $ " +
- "nssr $ supr $ xr $ admPoint $ subentry $ " +
- "shadow $ zombie $ immSupr $ rhob $ sa )" ) );
+ "nssr $ supr $ xr $ admPoint $ subentry $ " +
+ "shadow $ zombie $ immSupr $ rhob $ sa )" ) );
}
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DataQualitySyntaxSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DataQualitySyntaxSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DataQualitySyntaxSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DataQualitySyntaxSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -19,6 +19,7 @@
*/
package org.apache.directory.shared.ldap.model.schema.syntaxes;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -28,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for DataQualitySyntaxSyntaxChecker.
*
@@ -53,16 +55,19 @@ public class DataQualitySyntaxSyntaxChec
assertTrue( checker.isValidSyntax( "" ) );
}
+
@Test
public void testOid()
{
assertEquals( "1.3.6.1.4.1.1466.115.121.1.13", checker.getOid() );
}
+
@Test
public void testCorrectCase()
{
assertTrue( checker.isValidSyntax( "FALSE" ) );
- assertTrue( checker.isValidSyntax( new byte[]{0x01, (byte)0xFF} ) );
+ assertTrue( checker.isValidSyntax( new byte[]
+ { 0x01, ( byte ) 0xFF } ) );
}
}
Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DeliveryMethodSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DeliveryMethodSyntaxCheckerTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DeliveryMethodSyntaxCheckerTest.java (original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DeliveryMethodSyntaxCheckerTest.java Tue Jan 24 17:44:03 2012
@@ -29,6 +29,7 @@ import org.apache.directory.shared.ldap.
import org.junit.Test;
import org.junit.runner.RunWith;
+
/**
* Test cases for DeliveryMethodSyntaxChecker.
*
@@ -63,7 +64,8 @@ public class DeliveryMethodSyntaxChecker
assertFalse( checker.isValidSyntax( "1" ) );
assertFalse( checker.isValidSyntax( "B" ) );
}
-
+
+
@Test
public void testWrongCase()
{
@@ -78,7 +80,7 @@ public class DeliveryMethodSyntaxChecker
assertFalse( checker.isValidSyntax( " any any" ) );
}
-
+
@Test
public void testCorrectCase()
{