directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r754570 - /directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/
Date Sun, 15 Mar 2009 00:29:16 GMT
Author: elecharny
Date: Sun Mar 15 00:29:16 2009
New Revision: 754570

URL: http://svn.apache.org/viewvc?rev=754570&view=rev
Log:
Switched to JUNIT 4.4

Modified:
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/AttributeTypeDescriptionSchemaParserTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/ComparatorDescriptionSchemaParserTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/DITContentRuleDescriptionSchemaParserTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/DITStructureRuleDescriptionSchemaParserTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/LdapSyntaxDescriptionSchemaParserTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/MatchingRuleDescriptionSchemaParserTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/MatchingRuleUseDescriptionSchemaParserTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NameFormDescriptionSchemaParserTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NormalizerDescriptionSchemaParserTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/ObjectClassDescriptionSchemaParserTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/SyntaxCheckerDescriptionSchemaParserTest.java

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/AttributeTypeDescriptionSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/AttributeTypeDescriptionSchemaParserTest.java?rev=754570&r1=754569&r2=754570&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/AttributeTypeDescriptionSchemaParserTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/AttributeTypeDescriptionSchemaParserTest.java Sun Mar 15 00:29:16 2009
@@ -22,13 +22,19 @@
 
 import java.text.ParseException;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.ldap.schema.UsageEnum;
 import org.apache.directory.shared.ldap.schema.parser.ConsoleParserMonitor;
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescriptionSchemaParser;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 
 /**
@@ -36,20 +42,22 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AttributeTypeDescriptionSchemaParserTest extends TestCase
+public class AttributeTypeDescriptionSchemaParserTest
 {
     /** the parser instance */
     private AttributeTypeDescriptionSchemaParser parser;
 
 
-    protected void setUp() throws Exception
+    @Before
+    public void setUp() throws Exception
     {
         parser = new AttributeTypeDescriptionSchemaParser();
         parser.setParserMonitor( new ConsoleParserMonitor() );
     }
 
 
-    protected void tearDown() throws Exception
+    @After
+    public void tearDown() throws Exception
     {
         parser = null;
     }
@@ -60,6 +68,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNumericOid() throws ParseException
     {
         SchemaParserTestUtils.testNumericOid( parser, "SYNTAX 1.1" );
@@ -71,6 +80,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNames() throws ParseException
     {
         SchemaParserTestUtils.testNames( parser, "1.1", "SYNTAX 1.1" );
@@ -82,6 +92,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testDescription() throws ParseException
     {
         SchemaParserTestUtils.testDescription( parser, "1.1", "SYNTAX 1.1" );
@@ -93,6 +104,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testObsolete() throws ParseException
     {
         SchemaParserTestUtils.testObsolete( parser, "1.1", "SYNTAX 1.1" );
@@ -104,6 +116,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testSuperType() throws ParseException
     {
         String value = null;
@@ -188,6 +201,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testEquality() throws ParseException
     {
         String value = null;
@@ -231,6 +245,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testOrdering() throws ParseException
     {
         String value = null;
@@ -274,6 +289,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testSubstring() throws ParseException
     {
         String value = null;
@@ -318,6 +334,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testSyntax() throws ParseException
     {
         String value = null;
@@ -445,6 +462,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testSingleValue() throws ParseException
     {
         String value = null;
@@ -484,6 +502,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testCollective() throws ParseException
     {
         String value = null;
@@ -523,6 +542,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNoUserModification() throws ParseException
     {
         String value = null;
@@ -562,6 +582,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testUsage() throws ParseException
     {
         String value = null;
@@ -616,6 +637,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testExtensions() throws ParseException
     {
         SchemaParserTestUtils.testExtensions( parser, "1.1", "SYNTAX 1.1" );
@@ -627,6 +649,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testFull() throws ParseException
     {
         String value = null;
@@ -670,6 +693,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testUniqueElements()
     {
         String[] testValues = new String[]
@@ -690,6 +714,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testRequiredElements() throws ParseException
     {
         String value = null;
@@ -732,6 +757,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testCollecitveConstraint() throws ParseException
     {
         String value = null;
@@ -791,6 +817,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNoUserModificatonConstraint() throws ParseException
     {
         String value = null;
@@ -843,6 +870,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testIgnoreElementOrder() throws ParseException
     {
         String value = "( 2.5.4.3 SUP name SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications DESC 'RFC2256: common name(s) for which the entity is known by'  EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch NAME ( 'cn' 'commonName' )  )";
@@ -866,6 +894,7 @@
     //         Some real-world attribute type definitions         //
     ////////////////////////////////////////////////////////////////
 
+    @Test
     public void testRfcUid() throws ParseException
     {
         String value = "( 0.9.2342.19200300.100.1.1 NAME ( 'uid' 'userid' ) DESC 'RFC1274: user identifier' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} USAGE userApplications )";
@@ -897,6 +926,7 @@
     /**
      * Tests the parse of a simple AttributeType
      */
+    @Test
     public void testAddAttributeType() throws ParseException
     {
         String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 NAME ( 'bogus' 'bogusName' ) "
@@ -914,6 +944,7 @@
     /**
      * Tests the parse of a simple AttributeType with the schema extension.
      */
+    @Test
     public void testAttributeTypeWithSchemaExtension() throws ParseException
     {
         String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 NAME ( 'bogus' 'bogusName' ) "
@@ -932,6 +963,7 @@
     /**
      * Tests the multithreaded use of a single parser.
      */
+    @Test
     public void testMultiThreaded() throws ParseException
     {
         String[] testValues = new String[]
@@ -947,6 +979,7 @@
     /**
      * Tests quirks mode.
      */
+    @Test
     public void testQuirksMode() throws ParseException
     {
         SchemaParserTestUtils.testQuirksMode( parser, "SYNTAX 1.1" );
@@ -986,8 +1019,8 @@
             // NAME with special chars
             value = "( 1.2.3 SYNTAX te_st NAME 't-e_s.t;' )";
             atd = parser.parseAttributeTypeDescription( value );
-            Assert.assertEquals( 1, atd.getNames().size() );
-            Assert.assertEquals( "t-e_s.t;", atd.getNames().get( 0 ) );
+            assertEquals( 1, atd.getNames().size() );
+            assertEquals( "t-e_s.t;", atd.getNames().get( 0 ) );
 
             // SYNTAX with underscore
             value = "( 1.1 SYNTAX te_st )";

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/ComparatorDescriptionSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/ComparatorDescriptionSchemaParserTest.java?rev=754570&r1=754569&r2=754570&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/ComparatorDescriptionSchemaParserTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/ComparatorDescriptionSchemaParserTest.java Sun Mar 15 00:29:16 2009
@@ -22,10 +22,13 @@
 
 import java.text.ParseException;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.ldap.schema.parsers.ComparatorDescription;
 import org.apache.directory.shared.ldap.schema.parsers.ComparatorDescriptionSchemaParser;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 
 /**
@@ -33,36 +36,41 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ComparatorDescriptionSchemaParserTest extends TestCase
+public class ComparatorDescriptionSchemaParserTest
 {
     /** the parser instance */
     private ComparatorDescriptionSchemaParser parser;
 
 
-    protected void setUp() throws Exception
+    @Before
+    public void setUp() throws Exception
     {
         parser = new ComparatorDescriptionSchemaParser();
     }
 
 
-    protected void tearDown() throws Exception
+    @After
+    public void tearDown() throws Exception
     {
         parser = null;
     }
 
 
+    @Test
     public void testNumericOid() throws ParseException
     {
         SchemaParserTestUtils.testNumericOid( parser, "FQCN org.apache.directory.SimpleComparator" );
     }
 
 
+    @Test
     public void testDescription() throws ParseException
     {
         SchemaParserTestUtils.testDescription( parser, "1.1", "FQCN org.apache.directory.SimpleComparator" );
     }
 
 
+    @Test
     public void testFqcn() throws ParseException
     {
         String value = null;
@@ -76,6 +84,7 @@
     }
 
 
+    @Test
     public void testBytecode() throws ParseException
     {
         String value = null;
@@ -101,12 +110,14 @@
     }
 
 
+    @Test
     public void testExtensions() throws ParseException
     {
         SchemaParserTestUtils.testExtensions( parser, "1.1", "FQCN org.apache.directory.SimpleComparator" );
     }
 
 
+    @Test
     public void testFull()
     {
         // TODO
@@ -118,6 +129,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testUniqueElements()
     {
         // TODO
@@ -129,6 +141,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testRequiredElements()
     {
         // TODO
@@ -138,6 +151,7 @@
     /**
      * Tests the multithreaded use of a single parser.
      */
+    @Test
     public void testMultiThreaded() throws ParseException
     {
         // TODO
@@ -147,6 +161,7 @@
     /**
      * Tests quirks mode.
      */
+    @Test
     public void testQuirksMode() throws ParseException
     {
         SchemaParserTestUtils.testQuirksMode( parser, "FQCN org.apache.directory.SimpleComparator" );

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/DITContentRuleDescriptionSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/DITContentRuleDescriptionSchemaParserTest.java?rev=754570&r1=754569&r2=754570&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/DITContentRuleDescriptionSchemaParserTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/DITContentRuleDescriptionSchemaParserTest.java Sun Mar 15 00:29:16 2009
@@ -22,10 +22,15 @@
 
 import java.text.ParseException;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.ldap.schema.parsers.DITContentRuleDescription;
 import org.apache.directory.shared.ldap.schema.parsers.DITContentRuleDescriptionSchemaParser;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
 
 
 /**
@@ -33,19 +38,21 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DITContentRuleDescriptionSchemaParserTest extends TestCase
+public class DITContentRuleDescriptionSchemaParserTest
 {
     /** the parser instance */
     private DITContentRuleDescriptionSchemaParser parser;
 
 
-    protected void setUp() throws Exception
+    @Before
+    public void setUp() throws Exception
     {
         parser = new DITContentRuleDescriptionSchemaParser();
     }
 
 
-    protected void tearDown() throws Exception
+    @After
+    public void tearDown() throws Exception
     {
         parser = null;
     }
@@ -56,6 +63,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNumericOid() throws ParseException
     {
         SchemaParserTestUtils.testNumericOid( parser, "" );
@@ -67,6 +75,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNames() throws ParseException
     {
         SchemaParserTestUtils.testNames( parser, "1.1", "" );
@@ -78,6 +87,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testDescription() throws ParseException
     {
         SchemaParserTestUtils.testDescription( parser, "1.1", "" );
@@ -89,6 +99,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testObsolete() throws ParseException
     {
         SchemaParserTestUtils.testObsolete( parser, "1.1", "" );
@@ -100,6 +111,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testAux() throws ParseException
     {
         String value = null;
@@ -238,6 +250,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testMust() throws ParseException
     {
         String value = null;
@@ -298,6 +311,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testMay() throws ParseException
     {
         String value = null;
@@ -346,6 +360,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNot() throws ParseException
     {
         String value = null;
@@ -393,6 +408,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testExtensions() throws ParseException
     {
         SchemaParserTestUtils.testExtensions( parser, "1.1", "" );
@@ -405,6 +421,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testFull() throws ParseException
     {
         String value = null;
@@ -452,6 +469,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testUniqueElements()
     {
         String[] testValues = new String[]
@@ -465,6 +483,7 @@
     /**
      * Tests the multithreaded use of a single parser.
      */
+    @Test
     public void testMultiThreaded() throws ParseException
     {
         String[] testValues = new String[]
@@ -481,6 +500,7 @@
     /**
      * Tests quirks mode.
      */
+    @Test
     public void testQuirksMode() throws ParseException
     {
         SchemaParserTestUtils.testQuirksMode( parser, "" );

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/DITStructureRuleDescriptionSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/DITStructureRuleDescriptionSchemaParserTest.java?rev=754570&r1=754569&r2=754570&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/DITStructureRuleDescriptionSchemaParserTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/DITStructureRuleDescriptionSchemaParserTest.java Sun Mar 15 00:29:16 2009
@@ -22,10 +22,15 @@
 
 import java.text.ParseException;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.ldap.schema.parsers.DITStructureRuleDescription;
 import org.apache.directory.shared.ldap.schema.parsers.DITStructureRuleDescriptionSchemaParser;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
 
 
 /**
@@ -33,19 +38,21 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DITStructureRuleDescriptionSchemaParserTest extends TestCase
+public class DITStructureRuleDescriptionSchemaParserTest
 {
     /** the parser instance */
     private DITStructureRuleDescriptionSchemaParser parser;
 
 
-    protected void setUp() throws Exception
+    @Before
+    public void setUp() throws Exception
     {
         parser = new DITStructureRuleDescriptionSchemaParser();
     }
 
 
-    protected void tearDown() throws Exception
+    @After
+    public void tearDown() throws Exception
     {
         parser = null;
     }
@@ -56,6 +63,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNumericRuleId() throws ParseException
     {
         String value = null;
@@ -144,6 +152,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNames() throws ParseException
     {
         SchemaParserTestUtils.testNames( parser, "1", "FORM 1.1" );
@@ -155,6 +164,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testDescription() throws ParseException
     {
         SchemaParserTestUtils.testDescription( parser, "1", "FORM 1.1" );
@@ -166,6 +176,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testObsolete() throws ParseException
     {
         SchemaParserTestUtils.testObsolete( parser, "1", "FORM 1.1" );
@@ -177,6 +188,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testForm() throws ParseException
     {
         String value = null;
@@ -263,6 +275,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testSup() throws ParseException
     {
         String value = null;
@@ -324,6 +337,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testExtensions() throws ParseException
     {
         SchemaParserTestUtils.testExtensions( parser, "1", "FORM 1.1" );
@@ -336,6 +350,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testFull() throws ParseException
     {
         String value = null;
@@ -372,6 +387,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testUniqueElements()
     {
         String[] testValues = new String[]
@@ -387,6 +403,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testRequiredElements() throws ParseException
     {
         String value = null;
@@ -413,6 +430,7 @@
     /**
      * Tests the multithreaded use of a single parser.
      */
+    @Test
     public void testMultiThreaded() throws ParseException
     {
         String[] testValues = new String[]
@@ -429,6 +447,7 @@
     /**
      * Tests quirks mode.
      */
+    @Test
     public void testQuirksMode() throws ParseException
     {
         try

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/LdapSyntaxDescriptionSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/LdapSyntaxDescriptionSchemaParserTest.java?rev=754570&r1=754569&r2=754570&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/LdapSyntaxDescriptionSchemaParserTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/LdapSyntaxDescriptionSchemaParserTest.java Sun Mar 15 00:29:16 2009
@@ -22,10 +22,13 @@
 
 import java.text.ParseException;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescription;
 import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescriptionSchemaParser;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 
 /**
@@ -33,19 +36,21 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class LdapSyntaxDescriptionSchemaParserTest extends TestCase
+public class LdapSyntaxDescriptionSchemaParserTest
 {
     /** the parser instance */
     private LdapSyntaxDescriptionSchemaParser parser;
 
 
-    protected void setUp() throws Exception
+    @Before
+    public void setUp() throws Exception
     {
         parser = new LdapSyntaxDescriptionSchemaParser();
     }
 
 
-    protected void tearDown() throws Exception
+    @After
+    public void tearDown() throws Exception
     {
         parser = null;
     }
@@ -56,6 +61,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNumericOid() throws ParseException
     {
         SchemaParserTestUtils.testNumericOid( parser, "" );
@@ -67,6 +73,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNames() throws ParseException
     {
         SchemaParserTestUtils.testNames( parser, "1.1", "" );
@@ -78,6 +85,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testDescription() throws ParseException
     {
         SchemaParserTestUtils.testDescription( parser, "1.1", "" );
@@ -89,6 +97,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testExtensions() throws ParseException
     {
         SchemaParserTestUtils.testExtensions( parser, "1.1", "" );
@@ -100,6 +109,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testFull() throws ParseException
     {
         String value = null;
@@ -127,6 +137,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testUniqueElements()
     {
         String[] testValues = new String[]
@@ -139,6 +150,7 @@
     //         Some real-world attribute type definitions         //
     ////////////////////////////////////////////////////////////////
 
+    @Test
     public void testRfcBinary() throws ParseException
     {
         String value = "( 1.3.6.1.4.1.1466.115.121.1.5 DESC 'Binary' X-NOT-HUMAN-READABLE 'TRUE' )";
@@ -156,6 +168,7 @@
     /**
      * Tests the parse of a simple AttributeType with the schema extension.
      */
+    @Test
     public void testSyntaxWithExtensions() throws ParseException
     {
         String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 DESC 'bogus description' X-SCHEMA 'blah' X-IS-HUMAN-READABLE 'true' )";
@@ -169,6 +182,7 @@
     /**
      * Tests the multithreaded use of a single parser.
      */
+    @Test
     public void testMultiThreaded() throws ParseException
     {
         String[] testValues = new String[]
@@ -184,6 +198,7 @@
     /**
      * Tests quirks mode.
      */
+    @Test
     public void testQuirksMode() throws ParseException
     {
         SchemaParserTestUtils.testQuirksMode( parser, "" );

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/MatchingRuleDescriptionSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/MatchingRuleDescriptionSchemaParserTest.java?rev=754570&r1=754569&r2=754570&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/MatchingRuleDescriptionSchemaParserTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/MatchingRuleDescriptionSchemaParserTest.java Sun Mar 15 00:29:16 2009
@@ -22,10 +22,17 @@
 
 import java.text.ParseException;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescription;
 import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescriptionSchemaParser;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 
 /**
@@ -33,48 +40,55 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class MatchingRuleDescriptionSchemaParserTest extends TestCase
+public class MatchingRuleDescriptionSchemaParserTest
 {
     /** the parser instance */
     private MatchingRuleDescriptionSchemaParser parser;
 
 
-    protected void setUp() throws Exception
+    @Before
+    public void setUp() throws Exception
     {
         parser = new MatchingRuleDescriptionSchemaParser();
     }
 
 
-    protected void tearDown() throws Exception
+    @After
+    public void tearDown() throws Exception
     {
         parser = null;
     }
 
 
+    @Test
     public void testNumericOid() throws ParseException
     {
         SchemaParserTestUtils.testNumericOid( parser, "SYNTAX 1.1" );
     }
 
 
+    @Test
     public void testNames() throws ParseException
     {
         SchemaParserTestUtils.testNames( parser, "1.1", "SYNTAX 1.1" );
     }
 
 
+    @Test
     public void testDescription() throws ParseException
     {
         SchemaParserTestUtils.testDescription( parser, "1.1", "SYNTAX 1.1" );
     }
 
 
+    @Test
     public void testObsolete() throws ParseException
     {
         SchemaParserTestUtils.testObsolete( parser, "1.1", "SYNTAX 1.1" );
     }
 
 
+    @Test
     public void testSyntax() throws ParseException
     {
         String value = null;
@@ -141,12 +155,14 @@
     }
 
 
+    @Test
     public void testExtensions() throws ParseException
     {
         SchemaParserTestUtils.testExtensions( parser, "1.1", "SYNTAX 1.1" );
     }
 
 
+    @Test
     public void testFull() throws ParseException
     {
         String value = null;
@@ -179,6 +195,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testUniqueElements()
     {
         String[] testValues = new String[]
@@ -194,6 +211,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testRequiredElements() throws ParseException
     {
         String value = null;
@@ -223,6 +241,7 @@
     //         Some real-world matching rule descriptons          //
     ////////////////////////////////////////////////////////////////
 
+    @Test
     public void testRfc1() throws ParseException
     {
         String value = "( 2.5.13.5 NAME 'caseExactMatch' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )";
@@ -238,6 +257,7 @@
     }
 
 
+    @Test
     public void testSun1() throws ParseException
     {
         String value = "( 2.5.13.5 NAME 'caseExactMatch' DESC 'Case Exact Matching on Directory String [defined in X.520]' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )";
@@ -257,6 +277,7 @@
      * This is a real matching rule from Sun Directory 5.2. It has an invalid 
      * syntax, no DOTs allowed in NAME value. 
      */
+    @Test
     public void testSun2() throws ParseException
     {
         String value = "( 1.3.6.1.4.1.42.2.27.9.4.34.3.6 NAME 'caseExactSubstringMatch-2.16.840.1.113730.3.3.2.11.3' DESC 'en' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )";
@@ -289,6 +310,7 @@
     /**
      * Tests the multithreaded use of a single parser.
      */
+    @Test
     public void testMultiThreaded() throws ParseException
     {
         String[] testValues = new String[]
@@ -304,6 +326,7 @@
     /**
      * Tests quirks mode.
      */
+    @Test
     public void testQuirksMode() throws ParseException
     {
         SchemaParserTestUtils.testQuirksMode( parser, "SYNTAX 1.1" );

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/MatchingRuleUseDescriptionSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/MatchingRuleUseDescriptionSchemaParserTest.java?rev=754570&r1=754569&r2=754570&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/MatchingRuleUseDescriptionSchemaParserTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/MatchingRuleUseDescriptionSchemaParserTest.java Sun Mar 15 00:29:16 2009
@@ -22,10 +22,16 @@
 
 import java.text.ParseException;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleUseDescription;
 import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleUseDescriptionSchemaParser;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
 
 
 /**
@@ -33,48 +39,55 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class MatchingRuleUseDescriptionSchemaParserTest extends TestCase
+public class MatchingRuleUseDescriptionSchemaParserTest
 {
     /** the parser instance */
     private MatchingRuleUseDescriptionSchemaParser parser;
 
 
-    protected void setUp() throws Exception
+    @Before
+    public void setUp() throws Exception
     {
         parser = new MatchingRuleUseDescriptionSchemaParser();
     }
 
 
-    protected void tearDown() throws Exception
+    @After
+    public void tearDown() throws Exception
     {
         parser = null;
     }
 
 
+    @Test
     public void testNumericOid() throws ParseException
     {
         SchemaParserTestUtils.testNumericOid( parser, "APPLIES 1.1" );
     }
 
 
+    @Test
     public void testNames() throws ParseException
     {
         SchemaParserTestUtils.testNames( parser, "1.1", "APPLIES 1.1" );
     }
 
 
+    @Test
     public void testDescription() throws ParseException
     {
         SchemaParserTestUtils.testDescription( parser, "1.1", "APPLIES 1.1" );
     }
 
 
+    @Test
     public void testObsolete() throws ParseException
     {
         SchemaParserTestUtils.testObsolete( parser, "1.1", "APPLIES 1.1" );
     }
 
 
+    @Test
     public void testApplies() throws ParseException
     {
 
@@ -229,12 +242,14 @@
     }
 
 
+    @Test
     public void testExtensions() throws ParseException
     {
         SchemaParserTestUtils.testExtensions( parser, "1.1", "APPLIES 1.1" );
     }
 
 
+    @Test
     public void testFull() throws ParseException
     {
         String value = null;
@@ -270,6 +285,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testUniqueElements()
     {
         String[] testValues = new String[]
@@ -285,6 +301,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testRequiredElements() throws ParseException
     {
         String value = null;
@@ -314,6 +331,7 @@
     //       Some real-world matching rule use descriptons        //
     ////////////////////////////////////////////////////////////////
 
+    @Test
     public void testOpenldap1() throws ParseException
     {
         String value = "( 2.5.13.17 NAME 'octetStringMatch' APPLIES ( javaSerializedData $ userPassword ) )";
@@ -334,6 +352,7 @@
     /**
      * Tests the multithreaded use of a single parser.
      */
+    @Test
     public void testMultiThreaded() throws ParseException
     {
         String[] testValues = new String[]
@@ -349,6 +368,7 @@
     /**
      * Tests quirks mode.
      */
+    @Test
     public void testQuirksMode() throws ParseException
     {
         SchemaParserTestUtils.testQuirksMode( parser, "APPLIES 1.1" );

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NameFormDescriptionSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NameFormDescriptionSchemaParserTest.java?rev=754570&r1=754569&r2=754570&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NameFormDescriptionSchemaParserTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NameFormDescriptionSchemaParserTest.java Sun Mar 15 00:29:16 2009
@@ -22,10 +22,15 @@
 
 import java.text.ParseException;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.ldap.schema.parsers.NameFormDescription;
 import org.apache.directory.shared.ldap.schema.parsers.NameFormDescriptionSchemaParser;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
 
 
 /**
@@ -33,19 +38,21 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class NameFormDescriptionSchemaParserTest extends TestCase
+public class NameFormDescriptionSchemaParserTest
 {
     /** the parser instance */
     private NameFormDescriptionSchemaParser parser;
 
 
-    protected void setUp() throws Exception
+    @Before
+    public void setUp() throws Exception
     {
         parser = new NameFormDescriptionSchemaParser();
     }
 
 
-    protected void tearDown() throws Exception
+    @After
+    public void tearDown() throws Exception
     {
         parser = null;
     }
@@ -56,6 +63,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNumericOid() throws ParseException
     {
         SchemaParserTestUtils.testNumericOid( parser, "OC o MUST m" );
@@ -67,6 +75,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNames() throws ParseException
     {
         SchemaParserTestUtils.testNames( parser, "1.1", "OC o MUST m" );
@@ -78,6 +87,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testDescription() throws ParseException
     {
         SchemaParserTestUtils.testDescription( parser, "1.1", "OC o MUST m" );
@@ -89,6 +99,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testObsolete() throws ParseException
     {
         SchemaParserTestUtils.testObsolete( parser, "1.1", "OC o MUST m" );
@@ -100,6 +111,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testOc() throws ParseException
     {
         String value = null;
@@ -201,6 +213,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testMust() throws ParseException
     {
         String value = null;
@@ -279,6 +292,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testMay() throws ParseException
     {
         String value = null;
@@ -338,6 +352,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testExtensions() throws ParseException
     {
         SchemaParserTestUtils.testExtensions( parser, "1.1", "OC o MUST m" );
@@ -350,6 +365,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testFull() throws ParseException
     {
         String value = null;
@@ -391,6 +407,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testUniqueElements()
     {
         String[] testValues = new String[]
@@ -407,6 +424,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testRequiredElements() throws ParseException
     {
         String value = null;
@@ -451,6 +469,7 @@
     //     * 
     //     * @throws ParseException
     //     */
+    //    @Test
     //    public void testDisjoint() throws ParseException
     //    {
     //        String value = null;
@@ -488,6 +507,7 @@
     /**
      * Tests the multithreaded use of a single parser.
      */
+    @Test
     public void testMultiThreaded() throws ParseException
     {
         String[] testValues = new String[]
@@ -504,6 +524,7 @@
     /**
      * Tests quirks mode.
      */
+    @Test
     public void testQuirksMode() throws ParseException
     {
         SchemaParserTestUtils.testQuirksMode( parser, "OC o MUST m" );

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NormalizerDescriptionSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NormalizerDescriptionSchemaParserTest.java?rev=754570&r1=754569&r2=754570&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NormalizerDescriptionSchemaParserTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NormalizerDescriptionSchemaParserTest.java Sun Mar 15 00:29:16 2009
@@ -22,10 +22,13 @@
 
 import java.text.ParseException;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.ldap.schema.parsers.NormalizerDescription;
 import org.apache.directory.shared.ldap.schema.parsers.NormalizerDescriptionSchemaParser;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 
 /**
@@ -33,36 +36,41 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class NormalizerDescriptionSchemaParserTest extends TestCase
+public class NormalizerDescriptionSchemaParserTest
 {
     /** the parser instance */
     private NormalizerDescriptionSchemaParser parser;
 
 
-    protected void setUp() throws Exception
+    @Before
+    public void setUp() throws Exception
     {
         parser = new NormalizerDescriptionSchemaParser();
     }
 
 
-    protected void tearDown() throws Exception
+    @After
+    public void tearDown() throws Exception
     {
         parser = null;
     }
 
 
+    @Test
     public void testNumericOid() throws ParseException
     {
         SchemaParserTestUtils.testNumericOid( parser, "FQCN org.apache.directory.SimpleNormalizer" );
     }
 
 
+    @Test
     public void testDescription() throws ParseException
     {
         SchemaParserTestUtils.testDescription( parser, "1.1", "FQCN org.apache.directory.SimpleNormalizer" );
     }
 
 
+    @Test
     public void testFqcn() throws ParseException
     {
         String value = null;
@@ -76,6 +84,7 @@
     }
 
 
+    @Test
     public void testBytecode() throws ParseException
     {
         String value = null;
@@ -89,12 +98,14 @@
     }
 
 
+    @Test
     public void testExtensions() throws ParseException
     {
         SchemaParserTestUtils.testExtensions( parser, "1.1", "FQCN org.apache.directory.SimpleNormalizer" );
     }
 
 
+    @Test
     public void testFull()
     {
         // TODO
@@ -106,6 +117,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testUniqueElements()
     {
         // TODO
@@ -117,6 +129,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testRequiredElements()
     {
         // TODO
@@ -126,6 +139,7 @@
     /**
      * Tests the multithreaded use of a single parser.
      */
+    @Test
     public void testMultiThreaded() throws ParseException
     {
         // TODO
@@ -135,6 +149,7 @@
     /**
      * Tests quirks mode.
      */
+    @Test
     public void testQuirksMode() throws ParseException
     {
         SchemaParserTestUtils.testQuirksMode( parser, "FQCN org.apache.directory.SimpleNormalizer" );

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/ObjectClassDescriptionSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/ObjectClassDescriptionSchemaParserTest.java?rev=754570&r1=754569&r2=754570&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/ObjectClassDescriptionSchemaParserTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/ObjectClassDescriptionSchemaParserTest.java Sun Mar 15 00:29:16 2009
@@ -22,12 +22,17 @@
 
 import java.text.ParseException;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescriptionSchemaParser;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 
 /**
@@ -35,19 +40,21 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ObjectClassDescriptionSchemaParserTest extends TestCase
+public class ObjectClassDescriptionSchemaParserTest
 {
     /** the parser instance */
     private ObjectClassDescriptionSchemaParser parser;
 
 
-    protected void setUp() throws Exception
+    @Before
+    public void setUp() throws Exception
     {
         parser = new ObjectClassDescriptionSchemaParser();
     }
 
 
-    protected void tearDown() throws Exception
+    @After
+    public void tearDown() throws Exception
     {
         parser = null;
     }
@@ -58,6 +65,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNumericOid() throws ParseException
     {
         SchemaParserTestUtils.testNumericOid( parser, "" );
@@ -69,6 +77,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testNames() throws ParseException
     {
         SchemaParserTestUtils.testNames( parser, "1.1", "" );
@@ -80,6 +89,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testDescription() throws ParseException
     {
         SchemaParserTestUtils.testDescription( parser, "1.1", "" );
@@ -91,6 +101,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testObsolete() throws ParseException
     {
         SchemaParserTestUtils.testObsolete( parser, "1.1", "" );
@@ -102,6 +113,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testSuperior() throws ParseException
     {
         String value = null;
@@ -239,6 +251,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testKind() throws ParseException
     {
         String value = null;
@@ -289,6 +302,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testMust() throws ParseException
     {
         String value = null;
@@ -358,6 +372,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testMay() throws ParseException
     {
         String value = null;
@@ -414,6 +429,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testExtensions() throws ParseException
     {
         SchemaParserTestUtils.testExtensions( parser, "1.1", "" );
@@ -426,6 +442,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testFull() throws ParseException
     {
         String value = null;
@@ -470,6 +487,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testUniqueElements()
     {
         String[] testValues = new String[]
@@ -486,6 +504,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testIgnoreElementOrder() throws ParseException
     {
         String value = "( 2.5.6.6 STRUCTURAL MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) SUP top DESC 'RFC2256: a person' MUST ( sn $ cn ) NAME 'person' )";
@@ -515,6 +534,7 @@
     //          Some real-world object class definitions          //
     ////////////////////////////////////////////////////////////////
 
+    @Test
     public void testRfcTop() throws ParseException
     {
         String value = "( 2.5.6.0 NAME 'top' DESC 'top of the superclass chain' ABSTRACT MUST objectClass )";
@@ -533,6 +553,7 @@
     }
 
 
+    @Test
     public void testRfcPerson() throws ParseException
     {
         String value = "( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP top STRUCTURAL MUST ( sn $ cn ) MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) )";
@@ -557,6 +578,7 @@
     }
 
 
+    @Test
     public void testRfcSimpleSecurityObject() throws ParseException
     {
         String value = "( 0.9.2342.19200300.100.4.19 NAME 'simpleSecurityObject' DESC 'RFC1274: simple security object' SUP top AUXILIARY MUST userPassword )";
@@ -576,6 +598,7 @@
     }
 
 
+    @Test
     public void testSunAlias() throws ParseException
     {
         String value = "( 2.5.6.1 NAME 'alias' DESC 'Standard LDAP objectclass' SUP top ABSTRACT MUST aliasedObjectName X-ORIGIN 'RFC 2256' )";
@@ -599,6 +622,7 @@
     }
 
 
+    @Test
     public void testNovellDcObject() throws ParseException
     {
         String value = "( 1.3.6.1.4.1.1466.344 NAME 'dcObject' AUXILIARY MUST dc X-NDS_NAMING 'dc' X-NDS_NOT_CONTAINER '1' X-NDS_NONREMOVABLE '1' )";
@@ -627,6 +651,7 @@
     }
 
 
+    @Test
     public void testNovellList() throws ParseException
     {
         String value = "( 2.16.840.1.113719.1.1.6.1.30 NAME 'List' SUP Top STRUCTURAL MUST cn MAY ( description $ l $ member $ ou $ o $ eMailAddress $ mailboxLocation $ mailboxID $ owner $ seeAlso $ fullName ) X-NDS_NAMING 'cn' X-NDS_CONTAINMENT ( 'Organization' 'organizationalUnit' 'domain' ) X-NDS_NOT_CONTAINER '1' X-NDS_NONREMOVABLE '1' X-NDS_ACL_TEMPLATES '2#entry#[Root Template]#member' )";
@@ -672,6 +697,7 @@
     }
 
 
+    @Test
     public void testMicrosoftAds2000Locality() throws ParseException
     {
         String value = "( 2.5.6.3 NAME 'locality' SUP top STRUCTURAL MUST (l ) MAY (st $ street $ searchGuide $ seeAlso ) )";
@@ -695,6 +721,7 @@
     }
 
 
+    @Test
     public void testMicrosoftAds2003Msieee() throws ParseException
     {
         String value = "( 1.2.840.113556.1.5.240 NAME 'msieee80211-Policy' SUP top STRUCTURAL MAY (msieee80211-Data $ msieee80211-DataType $ msieee80211-ID ) )";
@@ -716,6 +743,7 @@
     }
 
 
+    @Test
     public void testSiemensDirxX500Subschema() throws ParseException
     {
         String value = "( 2.5.20.1 NAME 'x500subSchema' AUXILIARY MAY (dITStructureRules $ nameForms $ dITContentRules $ x500objectClasses $ x500attributeTypes $ matchingRules $ matchingRuleUse) )";
@@ -738,6 +766,7 @@
     /**
      * Tests the multi-threaded use of a single parser.
      */
+    @Test
     public void testMultiThreaded() throws ParseException
     {
         String[] testValues = new String[]
@@ -753,6 +782,7 @@
     /**
      * Tests quirks mode.
      */
+    @Test
     public void testQuirksMode() throws ParseException
     {
         SchemaParserTestUtils.testQuirksMode( parser, "" );
@@ -790,8 +820,8 @@
             // NAME with special chars
             value = "( 1.2.3 NAME 't-e_s.t;' )";
             ocd = parser.parseObjectClassDescription( value );
-            Assert.assertEquals( 1, ocd.getNames().size() );
-            Assert.assertEquals( "t-e_s.t;", ocd.getNames().get( 0 ) );
+            assertEquals( 1, ocd.getNames().size() );
+            assertEquals( "t-e_s.t;", ocd.getNames().get( 0 ) );
 
             // SUP with underscore
             value = "( 1.1 SUP te_st )";

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/SyntaxCheckerDescriptionSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/SyntaxCheckerDescriptionSchemaParserTest.java?rev=754570&r1=754569&r2=754570&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/SyntaxCheckerDescriptionSchemaParserTest.java (original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/SyntaxCheckerDescriptionSchemaParserTest.java Sun Mar 15 00:29:16 2009
@@ -22,10 +22,14 @@
 
 import java.text.ParseException;
 
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.ldap.schema.parsers.SyntaxCheckerDescription;
 import org.apache.directory.shared.ldap.schema.parsers.SyntaxCheckerDescriptionSchemaParser;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 
 /**
@@ -34,7 +38,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class SyntaxCheckerDescriptionSchemaParserTest extends TestCase
+public class SyntaxCheckerDescriptionSchemaParserTest
 {
     private static final String OID = "1.3.6.1.4.1.18060.0.4.0.2.10000";
     private static final String FQCN = "org.foo.Bar";
@@ -45,30 +49,35 @@
     private SyntaxCheckerDescriptionSchemaParser parser;
 
 
-    protected void setUp() throws Exception
+    @Before
+    public void setUp() throws Exception
     {
         parser = new SyntaxCheckerDescriptionSchemaParser();
     }
 
 
-    protected void tearDown() throws Exception
+    @After
+    public void tearDown() throws Exception
     {
         parser = null;
     }
 
 
+    @Test
     public void testNumericOid() throws ParseException
     {
         SchemaParserTestUtils.testNumericOid( parser, "FQCN org.apache.directory.SimpleComparator" );
     }
 
 
+    @Test
     public void testDescription() throws ParseException
     {
         SchemaParserTestUtils.testDescription( parser, "1.1", "FQCN org.apache.directory.SimpleComparator" );
     }
 
 
+    @Test
     public void testFqcn() throws ParseException
     {
         String value = null;
@@ -82,6 +91,7 @@
     }
 
 
+    @Test
     public void testBytecode() throws ParseException
     {
         String value = null;
@@ -95,12 +105,14 @@
     }
 
 
+    @Test
     public void testExtensions() throws ParseException
     {
         SchemaParserTestUtils.testExtensions( parser, "1.1", "FQCN org.apache.directory.SimpleComparator" );
     }
 
 
+    @Test
     public void testFull()
     {
         // TODO
@@ -112,6 +124,7 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testUniqueElements()
     {
         // TODO
@@ -123,12 +136,14 @@
      * 
      * @throws ParseException
      */
+    @Test
     public void testRequiredElements()
     {
         // TODO
     }
 
 
+    @Test
     public void testSimpleSyntaxChecker() throws ParseException
     {
         String simple = "( " + OID + " FQCN " + FQCN + " )";
@@ -141,6 +156,7 @@
     }
 
 
+    @Test
     public void testSyntaxCheckerWithDesc() throws ParseException
     {
         String simple = "( " + OID + " DESC '" + DESC + "' FQCN " + FQCN + " )";
@@ -153,6 +169,7 @@
     }
 
 
+    @Test
     public void testSyntaxCheckerWithDescAndByteCode() throws ParseException
     {
         String simple = "( " + OID + " DESC '" + DESC + "' FQCN " + FQCN + " BYTECODE " + BYTECODE + " )";
@@ -165,6 +182,7 @@
     }
 
 
+    @Test
     public void testSyntaxCheckerExample() throws ParseException
     {
         String simple = "( 1.3.6.1.4.1.18060.0.4.1.0.10000 DESC 'bogus desc' FQCN org.apache.directory.shared.ldap.schema.syntax.AcceptAllSyntaxChecker )";
@@ -173,6 +191,7 @@
     }
 
 
+    @Test
     public void testRealByteCodeExample() throws ParseException
     {
         String simple = "( 1.3.6.1.4.1.18060.0.4.1.0.10002 DESC 'bogus desc' "
@@ -201,6 +220,7 @@
     /**
      * Tests the multithreaded use of a single parser.
      */
+    @Test
     public void testMultiThreaded() throws ParseException
     {
         // TODO
@@ -210,6 +230,7 @@
     /**
      * Tests quirks mode.
      */
+    @Test
     public void testQuirksMode() throws ParseException
     {
         SchemaParserTestUtils.testQuirksMode( parser, "FQCN org.apache.directory.SimpleComparator" );



Mime
View raw message