Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 9809 invoked from network); 4 Dec 2007 22:59:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Dec 2007 22:59:40 -0000 Received: (qmail 83989 invoked by uid 500); 4 Dec 2007 22:59:28 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 83953 invoked by uid 500); 4 Dec 2007 22:59:28 -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 83942 invoked by uid 99); 4 Dec 2007 22:59:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Dec 2007 14:59:28 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Dec 2007 22:59:16 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 510691A983A; Tue, 4 Dec 2007 14:59:19 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r601136 - in /directory/apacheds/branches/bigbang: core-integ/src/test/java/org/apache/directory/server/core/ core-integ/src/test/java/org/apache/directory/server/core/jndi/ core-integ/src/test/java/org/apache/directory/server/core/operatio... Date: Tue, 04 Dec 2007 22:59:18 -0000 To: commits@directory.apache.org From: akarasulu@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071204225919.510691A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: akarasulu Date: Tue Dec 4 14:59:18 2007 New Revision: 601136 URL: http://svn.apache.org/viewvc?rev=601136&view=rev Log: merged preference tests and converted them along with op attr service tests Added: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java (contents, props changed) - copied, changed from r601129, directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/OperationalAttributeServiceIT.java directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java (contents, props changed) - copied, changed from r601108, directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/prefs/ServerSystemPreferencesITest.java Removed: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/OperationalAttributeServiceIT.java directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/prefs/ Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java?rev=601136&r1=601135&r2=601136&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java (original) +++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java Tue Dec 4 14:59:18 2007 @@ -29,6 +29,8 @@ import org.apache.directory.server.core.integ.annotations.Mode; import org.apache.directory.server.core.integ.annotations.Scope; import org.apache.directory.server.core.jndi.*; +import org.apache.directory.server.core.operational.OperationalAttributeServiceIT; +import org.apache.directory.server.core.prefs.PreferencesIT; import org.junit.runner.RunWith; import org.junit.runners.Suite; @@ -61,6 +63,7 @@ SearchContextIT.class, UniqueMemberIT.class, OperationalAttributeServiceIT.class, + PreferencesIT.class, PartitionConfigurationIT.class // Leaves the server in a bad state (partition removal is incomplete) } ) @Scope ( ServiceScope.TESTSUITE ) Copied: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java (from r601129, directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/OperationalAttributeServiceIT.java) URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java?p2=directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java&p1=directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/OperationalAttributeServiceIT.java&r1=601129&r2=601136&rev=601136&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/OperationalAttributeServiceIT.java (original) +++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java Tue Dec 4 14:59:18 2007 @@ -17,7 +17,7 @@ * under the License. * */ -package org.apache.directory.server.core.jndi; +package org.apache.directory.server.core.operational; import org.apache.directory.server.core.DirectoryService; Propchange: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java ------------------------------------------------------------------------------ --- svn:keywords (added) +++ svn:keywords Tue Dec 4 14:59:18 2007 @@ -0,0 +1,4 @@ +Rev +Revision +Date +Id Copied: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java (from r601108, directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/prefs/ServerSystemPreferencesITest.java) URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java?p2=directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java&p1=directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/prefs/ServerSystemPreferencesITest.java&r1=601108&r2=601136&rev=601136&view=diff ============================================================================== --- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/prefs/ServerSystemPreferencesITest.java (original) +++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java Tue Dec 4 14:59:18 2007 @@ -20,12 +20,15 @@ package org.apache.directory.server.core.prefs; +import org.apache.directory.server.core.DirectoryService; +import org.apache.directory.server.core.integ.CiRunner; +import static org.junit.Assert.*; +import org.junit.Test; +import org.junit.runner.RunWith; + import java.util.prefs.BackingStoreException; import java.util.prefs.Preferences; -import org.apache.directory.server.core.prefs.ServerSystemPreferences; -import org.apache.directory.server.core.unit.AbstractAdminTestCase; - /** * Tests the ServerSystemPreferences class. @@ -33,23 +36,32 @@ * @author Apache Directory Project * @version $Rev$ */ -public class ServerSystemPreferencesITest extends AbstractAdminTestCase +@RunWith ( CiRunner.class ) +public class PreferencesIT { - private ServerSystemPreferences prefs; + public static DirectoryService service; - public void setUp() throws Exception + @Test + public void testSystemRoot() { - super.setUp(); - prefs = new ServerSystemPreferences( service ); + ServerPreferencesFactory factory = new ServerPreferencesFactory( service ); + Preferences prefs = factory.systemRoot(); + + assertNotNull( prefs ); + assertEquals( "sysPrefRoot", prefs.get( "prefNodeName", "default value" ) ); } /** * Tests to make sure the system preferences root has entry (test, abc123). + * + * @throws Exception if there are failures with the store */ + @Test public void testRoot() throws Exception { + ServerSystemPreferences prefs = new ServerSystemPreferences( service ); assertEquals( "sysPrefRoot", prefs.get( "prefNodeName", "not the value" ) ); } @@ -59,8 +71,10 @@ * * @throws BackingStoreException if there are failures with the store */ + @Test public void testCreate() throws BackingStoreException { + ServerSystemPreferences prefs = new ServerSystemPreferences( service ); Preferences testNode = prefs.node( "testNode" ); testNode.put( "cn", "testNodeValue" ); @@ -73,8 +87,10 @@ * * @throws BackingStoreException if there are failures with the store */ + @Test public void testCreateAndSetBoolean() throws BackingStoreException { + ServerSystemPreferences prefs = new ServerSystemPreferences( service ); Preferences testNode = prefs.node( "testNode" ); testNode.putBoolean( "cn", false ); testNode.sync(); @@ -106,8 +122,10 @@ * * @throws BackingStoreException if there are failures with the store */ + @Test public void testCreateAndSetDouble() throws BackingStoreException { + ServerSystemPreferences prefs = new ServerSystemPreferences( service ); Preferences testNode = prefs.node( "testNode" ); testNode.putDouble( "cn", 3.14 ); testNode.sync(); @@ -121,8 +139,10 @@ * * @throws BackingStoreException if there are failures with the store */ + @Test public void testCreateAndSetFloat() throws BackingStoreException { + ServerSystemPreferences prefs = new ServerSystemPreferences( service ); Preferences testNode = prefs.node( "testNode" ); testNode.putFloat( "cn", ( float ) 9.20 ); testNode.sync(); @@ -136,8 +156,10 @@ * * @throws BackingStoreException if there are failures with the store */ + @Test public void testCreateAndSetInt() throws BackingStoreException { + ServerSystemPreferences prefs = new ServerSystemPreferences( service ); Preferences testNode = prefs.node( "testNode" ); testNode.putInt( "cn", 345 ); testNode.sync(); @@ -151,8 +173,10 @@ * * @throws BackingStoreException if there are failures with the store */ + @Test public void testCreateAndSetLong() throws BackingStoreException { + ServerSystemPreferences prefs = new ServerSystemPreferences( service ); Preferences testNode = prefs.node( "testNode" ); testNode.putLong( "cn", 75449559185447L ); testNode.sync(); @@ -166,8 +190,10 @@ * * @throws BackingStoreException if there are failures with the store */ + @Test public void testCreateAndRemove() throws BackingStoreException { + ServerSystemPreferences prefs = new ServerSystemPreferences( service ); Preferences testNode = prefs.node( "testNode" ); testNode.put( "cn", "testNodeValue" ); Propchange: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java ------------------------------------------------------------------------------ --- svn:keywords (added) +++ svn:keywords Tue Dec 4 14:59:18 2007 @@ -0,0 +1,4 @@ +Rev +Revision +Date +Id