Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 99592 invoked from network); 21 Jan 2010 00:58:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jan 2010 00:58:47 -0000 Received: (qmail 30814 invoked by uid 500); 21 Jan 2010 00:58:47 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 30752 invoked by uid 500); 21 Jan 2010 00:58:47 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 30743 invoked by uid 99); 21 Jan 2010 00:58:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jan 2010 00:58:47 +0000 X-ASF-Spam-Status: No, hits=-1999.6 required=10.0 tests=ALL_TRUSTED,SUBJECT_FUZZY_TION X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jan 2010 00:58:44 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7C27723889E3; Thu, 21 Jan 2010 00:58:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r901474 - in /directory/apacheds/trunk: avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/ core/src/test/java/org/apache/directory/server/core/authz/support/ core/src/test/java/org/apache/directory/server/core/parti... Date: Thu, 21 Jan 2010 00:58:22 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100121005822.7C27723889E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Thu Jan 21 00:58:21 2010 New Revision: 901474 URL: http://svn.apache.org/viewvc?rev=901474&view=rev Log: Switched to JUnit 4 @nnotations Removed: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/tree/ Modified: directory/apacheds/trunk/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlTableTest.java directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java Modified: directory/apacheds/trunk/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlTableTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlTableTest.java?rev=901474&r1=901473&r2=901474&view=diff ============================================================================== --- directory/apacheds/trunk/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlTableTest.java (original) +++ directory/apacheds/trunk/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlTableTest.java Thu Jan 21 00:58:21 2010 @@ -22,14 +22,17 @@ import static org.apache.directory.server.core.partition.avl.TableData.injectDupsData; import static org.apache.directory.server.core.partition.avl.TableData.injectNoDupsData; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import java.util.Comparator; -import junit.framework.TestCase; - import org.apache.directory.server.xdbm.Tuple; import org.apache.directory.shared.ldap.cursor.Cursor; import org.junit.Before; +import org.junit.Test; /** @@ -38,7 +41,7 @@ * @author Apache Directory Project * @version $Rev$, $Date$ */ -public class AvlTableTest extends TestCase +public class AvlTableTest { private AvlTable dups; private AvlTable nodups; @@ -53,6 +56,7 @@ } + @Test public void testGetName() { assertEquals( "dups", dups.getName() ); @@ -60,6 +64,7 @@ } + @Test public void testCursorWithKey() throws Exception { injectNoDupsData( nodups ); @@ -107,6 +112,7 @@ } + @Test public void testCursor() throws Exception { injectNoDupsData( nodups ); @@ -255,6 +261,7 @@ * Checks that cursor.after() behavior with duplicates enabled obeys * the required semantics. */ + @Test public void testCursorAfterWithDups() throws Exception { injectDupsData( dups ); @@ -293,6 +300,7 @@ /** * Tests the put() and get() methods on an AvlTable. */ + @Test public void testPutGetCount() throws Exception { // --------------------------------------------------------- Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java?rev=901474&r1=901473&r2=901474&view=diff ============================================================================== --- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java (original) +++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java Thu Jan 21 00:58:21 2010 @@ -119,7 +119,8 @@ private static DirectoryService service; - @BeforeClass public static void setup() throws Exception + @BeforeClass + public static void setup() throws Exception { service = new DefaultDirectoryService(); @@ -129,7 +130,8 @@ } - @Test public void testWrongScope() throws Exception + @Test + public void testWrongScope() throws Exception { MaxImmSubFilter filter = new MaxImmSubFilter(); Collection tuples = new ArrayList(); @@ -146,7 +148,8 @@ } - @Test public void testRootDSE() throws Exception + @Test + public void testRootDSE() throws Exception { MaxImmSubFilter filter = new MaxImmSubFilter(); @@ -161,7 +164,8 @@ } - @Test public void testZeroTuple() throws Exception + @Test + public void testZeroTuple() throws Exception { MaxImmSubFilter filter = new MaxImmSubFilter(); @@ -170,7 +174,8 @@ } - @Test public void testDenialTuple() throws Exception + @Test + public void testDenialTuple() throws Exception { MaxImmSubFilter filter = new MaxImmSubFilter(); Collection tuples = new ArrayList(); @@ -184,7 +189,8 @@ } - @Test public void testGrantTuple() throws Exception + @Test + public void testGrantTuple() throws Exception { MaxImmSubFilter filter = new MaxImmSubFilter(); Collection tuples = new ArrayList(); Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java?rev=901474&r1=901473&r2=901474&view=diff ============================================================================== --- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java (original) +++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java Thu Jan 21 00:58:21 2010 @@ -93,7 +93,9 @@ } } - @Before public void setup() throws NamingException + + @Before + public void setup() throws NamingException { LdapDN entryName = new LdapDN( "ou=test, ou=system" ); ENTRY = new DefaultServerEntry( schemaManager, entryName ); @@ -104,7 +106,8 @@ } - @Test public void testWrongScope() throws Exception + @Test + public void testWrongScope() throws Exception { MaxValueCountFilter filter = new MaxValueCountFilter(); Collection tuples = new ArrayList(); @@ -121,7 +124,8 @@ } - @Test public void testZeroTuple() throws Exception + @Test + public void testZeroTuple() throws Exception { MaxValueCountFilter filter = new MaxValueCountFilter(); @@ -130,7 +134,8 @@ } - @Test public void testDenialTuple() throws Exception + @Test + public void testDenialTuple() throws Exception { MaxValueCountFilter filter = new MaxValueCountFilter(); Collection tuples = new ArrayList(); @@ -146,7 +151,8 @@ } - @Test public void testGrantTuple() throws Exception + @Test + public void testGrantTuple() throws Exception { MaxValueCountFilter filter = new MaxValueCountFilter(); Collection tuples = new ArrayList(); Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java?rev=901474&r1=901473&r2=901474&view=diff ============================================================================== --- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java (original) +++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java Thu Jan 21 00:58:21 2010 @@ -87,7 +87,8 @@ private static AttributeType CN_AT; - @BeforeClass public static void setup() throws Exception + @BeforeClass + public static void setup() throws Exception { JarLdifSchemaLoader loader = new JarLdifSchemaLoader(); @@ -129,14 +130,16 @@ return jndiAttributes; } - @Test public void testZeroTuple() throws Exception + @Test + public void testZeroTuple() throws Exception { assertEquals( 0, filterA.filter( null, EMPTY_ACI_TUPLE_COLLECTION, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null, null, null, null, null, null, null, null, null ).size() ); } - @Test public void testEntry() throws Exception + @Test + public void testEntry() throws Exception { Collection tuples = getTuples( ProtectedItem.ENTRY ); @@ -145,7 +148,8 @@ } - @Test public void testAllUserAttributeTypes() throws Exception + @Test + public void testAllUserAttributeTypes() throws Exception { Collection tuples = getTuples( ProtectedItem.ALL_USER_ATTRIBUTE_TYPES ); @@ -160,7 +164,8 @@ } - @Test public void testAllUserAttributeTypesAndValues() throws Exception + @Test + public void testAllUserAttributeTypesAndValues() throws Exception { Collection tuples = getTuples( ProtectedItem.ALL_USER_ATTRIBUTE_TYPES_AND_VALUES ); @@ -175,7 +180,8 @@ } - @Test public void testAllAttributeValues() throws Exception + @Test + public void testAllAttributeValues() throws Exception { Collection attrTypes = new ArrayList(); attrTypes.add( "cn" ); @@ -195,7 +201,8 @@ } - @Test public void testAttributeType() throws Exception + @Test + public void testAttributeType() throws Exception { Collection attrTypes = new ArrayList(); attrTypes.add( "cn" ); @@ -215,7 +222,8 @@ } - @Test public void testAttributeValue() throws Exception + @Test + public void testAttributeValue() throws Exception { Collection attributes = new ArrayList(); attributes.add( new DefaultServerAttribute( "cn", CN_AT, "valueA" ) ); @@ -249,7 +257,8 @@ } - @Test public void testMaxImmSub() throws Exception + @Test + public void testMaxImmSub() throws Exception { Collection tuples = getTuples( new ProtectedItem.MaxImmSub( 2 ) ); @@ -259,7 +268,8 @@ } - @Test public void testMaxValueCount() throws Exception + @Test + public void testMaxValueCount() throws Exception { Collection mvcItems = new ArrayList(); mvcItems.add( new MaxValueCountItem( "cn", 3 ) ); @@ -302,7 +312,8 @@ */ - @Test public void testRestrictedBy() throws Exception + @Test + public void testRestrictedBy() throws Exception { Collection rbItems = new ArrayList(); rbItems.add( new RestrictedByItem( "cn", "sn" ) ); @@ -325,7 +336,8 @@ } - @Test public void testSelfValue() throws Exception + @Test + public void testSelfValue() throws Exception { Collection attrTypes = new ArrayList(); attrTypes.add( "cn" ); Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java?rev=901474&r1=901473&r2=901474&view=diff ============================================================================== --- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java (original) +++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java Thu Jan 21 00:58:21 2010 @@ -75,7 +75,8 @@ private static SchemaManager schemaManager; - @BeforeClass public static void setup() throws Exception + @BeforeClass + public static void setup() throws Exception { JarLdifSchemaLoader loader = new JarLdifSchemaLoader(); @@ -96,7 +97,8 @@ } - @Test public void testWrongScope() throws Exception + @Test + public void testWrongScope() throws Exception { RestrictedByFilter filter = new RestrictedByFilter(); Collection tuples = new ArrayList(); @@ -112,7 +114,8 @@ } - @Test public void testZeroTuple() throws Exception + @Test + public void testZeroTuple() throws Exception { RestrictedByFilter filter = new RestrictedByFilter(); @@ -121,7 +124,8 @@ } - @Test public void testDenialTuple() throws Exception + @Test + public void testDenialTuple() throws Exception { RestrictedByFilter filter = new RestrictedByFilter(); Collection tuples = new ArrayList(); @@ -134,7 +138,8 @@ } - @Test public void testGrantTuple() throws Exception + @Test + public void testGrantTuple() throws Exception { RestrictedByFilter filter = new RestrictedByFilter(); Collection tuples = new ArrayList(); Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java?rev=901474&r1=901473&r2=901474&view=diff ============================================================================== --- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java (original) +++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java Thu Jan 21 00:58:21 2010 @@ -104,7 +104,8 @@ /** * Sets evaluator and registries to null. */ - @After public void tearDown() + @After + public void tearDown() { evaluator = null; } @@ -114,7 +115,8 @@ * Test cases for various bad combinations of arguments * @throws Exception if something goes wrong */ - @Test public void testForBadArguments() throws Exception + @Test + public void testForBadArguments() throws Exception { try { @@ -145,7 +147,8 @@ } - @Test public void testMatchByName() throws Exception + @Test + public void testMatchByName() throws Exception { ServerAttribute objectClasses = null; @@ -165,7 +168,8 @@ } - @Test public void testMatchByOID() throws Exception + @Test + public void testMatchByOID() throws Exception { ServerAttribute objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" ); @@ -184,7 +188,8 @@ } - @Test public void testComplexOrRefinement() throws Exception + @Test + public void testComplexOrRefinement() throws Exception { ExprNode refinement = null; ServerAttribute objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" ); @@ -202,7 +207,8 @@ } - @Test public void testComplexAndRefinement() throws Exception + @Test + public void testComplexAndRefinement() throws Exception { ExprNode refinement = null; ServerAttribute objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" ); @@ -224,7 +230,8 @@ } - @Test public void testComplexNotRefinement() throws Exception + @Test + public void testComplexNotRefinement() throws Exception { ExprNode refinement = null; ServerAttribute objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" ); Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java?rev=901474&r1=901473&r2=901474&view=diff ============================================================================== --- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java (original) +++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluatorTest.java Thu Jan 21 00:58:21 2010 @@ -101,7 +101,8 @@ /** * Sets evaluator and registries to null. */ - @After public void tearDown() + @After + public void tearDown() { evaluator = null; } @@ -111,7 +112,8 @@ * Test cases for various bad combinations of arguments * @throws Exception if something goes wrongg */ - @Test public void testForBadArguments() throws Exception + @Test + public void testForBadArguments() throws Exception { ServerAttribute objectClasses = null; @@ -164,7 +166,8 @@ } - @Test public void testMatchByName() throws Exception + @Test + public void testMatchByName() throws Exception { // positive test ServerAttribute objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" ); @@ -184,7 +187,8 @@ } - @Test public void testMatchByOID() throws Exception + @Test + public void testMatchByOID() throws Exception { ServerAttribute objectClasses = new DefaultServerAttribute( "objectClass", OBJECT_CLASS, "person" );