directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r753198 - in /directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/aci: ACIItemChekerTest.java ACIItemParserTest.java
Date Fri, 13 Mar 2009 11:04:31 GMT
Author: elecharny
Date: Fri Mar 13 11:04:31 2009
New Revision: 753198

URL: http://svn.apache.org/viewvc?rev=753198&view=rev
Log:
Swutched to JUnit 4.4

Modified:
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemChekerTest.java
    directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemChekerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemChekerTest.java?rev=753198&r1=753197&r2=753198&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemChekerTest.java
(original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemChekerTest.java
Fri Mar 13 11:04:31 2009
@@ -24,8 +24,8 @@
 import java.text.ParseException;
 
 import org.apache.directory.shared.ldap.aci.ACIItemChecker;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -34,7 +34,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 437007 $
  */
-public class ACIItemChekerTest extends TestCase
+public class ACIItemChekerTest
 {
 
     /** the ACIItem checker wrapper */
@@ -59,7 +59,6 @@
      */
     public ACIItemChekerTest(String s)
     {
-        super( s );
         checker = new ACIItemChecker();
     }
 
@@ -67,6 +66,7 @@
     /**
      * Tests the checker with an ACIItem of ItemFirst main component.
      */
+    @Test
     public void testItemFirst() throws Exception
     {
         String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
@@ -85,6 +85,7 @@
     /**
      * Tests the checker with an ACIItem of UserFirst main component.
      */
+    @Test
     public void testUserFirst() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -98,6 +99,7 @@
     }
 
 
+    @Test
     public void testAllowAddAllUsers() throws Exception
     {
         String spec = "{ identificationTag \"addAci\", " + "precedence 14, " + "authenticationLevel
none, "
@@ -108,6 +110,7 @@
     }
 
 
+    @Test
     public void testCombo() throws Exception
     {
         String spec = "{ identificationTag \"addAci\", " + "precedence 14, " + "authenticationLevel
none, "
@@ -118,6 +121,7 @@
     }
 
 
+    @Test
     public void testOrderOfProtectedItemsDoesNotMatter() throws Exception
     {
         String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
@@ -133,6 +137,7 @@
     }
 
 
+    @Test
     public void testOrderOfUserClassesDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -146,6 +151,7 @@
     }
 
 
+    @Test
     public void testItemPermissionComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
@@ -161,6 +167,7 @@
     }
 
 
+    @Test
     public void testUserPermissionComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -174,6 +181,7 @@
     }
 
 
+    @Test
     public void testOrderOfMainACIComponentsDoesNotMatter() throws Exception
     {
         String spec = "{   itemOrUserFirst userFirst:  { userClasses {  allUsers  , name
{ \"ou=people,cn=ersin\" }, "
@@ -187,6 +195,7 @@
     }
 
 
+    @Test
     public void testUserFirstComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -199,6 +208,7 @@
     }
 
 
+    @Test
     public void testItemFirstComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
@@ -213,6 +223,7 @@
     }
 
 
+    @Test
     public void testRestrictedValueComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -226,6 +237,7 @@
     }
 
 
+    @Test
     public void testMaxValueCountComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -239,6 +251,7 @@
     }
 
 
+    @Test
     public void testSubtreeSpecificationComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -254,6 +267,7 @@
     /**
      * Test case for DIRSERVER-891
      */
+    @Test
     public void testInvalidAttributeValue()
     {
         String spec;
@@ -295,6 +309,7 @@
     /**
      * Test case for DIRSERVER-891
      */
+    @Test
     public void testIncomplete()
     {
         String spec;
@@ -343,5 +358,4 @@
             // Expected
         }
     }
-    
 }

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java?rev=753198&r1=753197&r2=753198&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java
(original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java
Fri Mar 13 11:04:31 2009
@@ -23,8 +23,10 @@
 
 import java.text.ParseException;
 
-import junit.framework.TestCase;
-
+import org.junit.Test;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertEquals;
 
 /**
  * Unit tests class for ACIItem parser (wrapper).
@@ -32,16 +34,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class ACIItemParserTest extends TestCase
+public class ACIItemParserTest
 {
 
     /** the ACIItem parser wrapper */
     ACIItemParser parser;
 
 
-    // /** holds multithreaded success value */
-    // boolean isSuccessMultithreaded = true;
-
     /**
      * Creates a ACIItemParserTest instance.
      */
@@ -57,7 +56,6 @@
      */
     public ACIItemParserTest( String s )
     {
-        super( s );
         parser = new ACIItemParser( null );
     }
 
@@ -72,6 +70,7 @@
     /**
      * Tests the parser with a rangeOfValues with a nested filter.
      */
+    @Test
     public void testRangeOfValues() throws Exception
     {
         String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
@@ -96,6 +95,7 @@
     /**
      * Tests the parser with an ACIItem of ItemFirst main component.
      */
+    @Test 
     public void testItemFirst() throws Exception
     {
         String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
@@ -115,6 +115,7 @@
     /**
      * Tests the parser with an ACIItem of UserFirst main component.
      */
+    @Test 
     public void testUserFirst() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -129,6 +130,7 @@
     }
 
 
+    @Test 
     public void testAllowAddAllUsers() throws Exception
     {
         String spec = "{ identificationTag \"addAci\", " + "precedence 14, " + "authenticationLevel
none, "
@@ -140,6 +142,7 @@
     }
 
 
+    @Test 
     public void testCombo() throws Exception
     {
         String spec = "{ identificationTag \"addAci\", " + "precedence 14, " + "authenticationLevel
none, "
@@ -151,6 +154,7 @@
     }
 
 
+    @Test 
     public void testOrderOfProtectedItemsDoesNotMatter() throws Exception
     {
         String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
@@ -167,6 +171,7 @@
     }
 
 
+    @Test 
     public void testOrderOfUserClassesDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -181,6 +186,7 @@
     }
 
 
+    @Test 
     public void testOrderOfProtectedItemsDoesNotMatterButDuplicatesMatter() throws Exception
     {
         String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
@@ -204,6 +210,7 @@
     }
 
 
+    @Test 
     public void testOrderOfUserClassesDoesNotMatterButDuplicatesMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -225,6 +232,7 @@
     }
 
 
+    @Test 
     public void testItemPermissionComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
@@ -241,6 +249,7 @@
     }
 
 
+    @Test 
     public void testItemPermissionComponentsOrderDoesNotMatterButDuplicatesMatter() throws
Exception
     {
         String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
@@ -265,6 +274,7 @@
     }
 
 
+    @Test 
     public void testUserPermissionComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -279,6 +289,7 @@
     }
 
 
+    @Test 
     public void testUserPermissionComponentsOrderDoesNotMatterButDuplicatesMatter() throws
Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -300,6 +311,7 @@
     }
 
 
+    @Test 
     public void testOrderOfMainACIComponentsDoesNotMatter() throws Exception
     {
         String spec = "{   itemOrUserFirst userFirst:  { userClasses {  allUsers  , name
{ \"ou=people,cn=ersin\" }, "
@@ -314,6 +326,7 @@
     }
 
 
+    @Test 
     public void testOrderOfMainACIComponentsDoesNotMatterButDuplicatesMatter() throws Exception
     {
         String spec = "{   itemOrUserFirst userFirst:  { userClasses {  allUsers  , name
{ \"ou=people,cn=ersin\" }, "
@@ -335,6 +348,7 @@
     }
 
 
+    @Test 
     public void testOrderOfMainACIComponentsDoesNotMatterButMissingsMatter() throws Exception
     {
         String spec = "{   itemOrUserFirst userFirst:  { userClasses {  allUsers  , name
{ \"ou=people,cn=ersin\" }, "
@@ -356,6 +370,7 @@
     }
 
 
+    @Test 
     public void testUserFirstComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -369,6 +384,7 @@
     }
 
 
+    @Test 
     public void testItemFirstComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = " {  identificationTag  \"id1\" , precedence 114  , authenticationLevel
simple  , "
@@ -384,6 +400,7 @@
     }
 
 
+    @Test 
     public void testGrantAndDenialBitsOrderDoesNotMatterButDuplicatesMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -402,6 +419,7 @@
     }
 
 
+    @Test 
     public void testMaxValueCountComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -416,6 +434,7 @@
     }
 
 
+    @Test 
     public void testRestrictedValueComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -430,6 +449,7 @@
     }
 
 
+    @Test 
     public void testMaxImmSubComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -443,6 +463,7 @@
     }
     
     
+    @Test 
     public void testSubtreeSpecificationComponentsOrderDoesNotMatter() throws Exception
     {
         String spec = "{ identificationTag \"id2\"   , precedence 14, authenticationLevel
none  , "
@@ -459,6 +480,7 @@
     /**
      * Test case for DIRSERVER-891
      */
+    @Test 
     public void testInvalidAttributeValue()
     {
         String spec;
@@ -496,6 +518,7 @@
         }
     }
     
+    @Test 
     public void testUserClassParentOfEntry() throws Exception
     {
         String spec = "{ identificationTag \"id\"   , precedence 10, authenticationLevel
none  , "
@@ -513,6 +536,7 @@
     /**
      * Test case for DIRSTUDIO-440
      */
+    @Test 
     public void testPrecedenceOfUserFirst() throws Exception
     {
         String spec = "{ identificationTag \"test\", precedence 14, authenticationLevel simple,
"
@@ -550,6 +574,7 @@
     /**
      * Test case for DIRSERVER-891
      */
+    @Test 
     public void testIncomplete()
     {
         String spec;



Mime
View raw message