directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r809654 - in /directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry: DefaultServerAttributeTest.java DefaultServerEntryTest.java ServerEntrySerializerTest.java ServerModificationTest.java
Date Mon, 31 Aug 2009 16:28:43 GMT
Author: elecharny
Date: Mon Aug 31 16:28:42 2009
New Revision: 809654

URL: http://svn.apache.org/viewvc?rev=809654&view=rev
Log:
Initialize the workingDirectory when the env is not set (for tests in eclipse)

Modified:
    directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java
    directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
    directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java
    directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java

Modified: directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java?rev=809654&r1=809653&r2=809654&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerAttributeTest.java
Mon Aug 31 16:28:42 2009
@@ -104,6 +104,14 @@
     public static void setup() throws Exception
     {
     	String workingDirectory = System.getProperty( "workingDirectory" );
+    	
+    	if ( workingDirectory == null )
+    	{
+    	    String path = DefaultServerAttributeTest.class.getResource( "" ).getPath();
+    	    int targetPos = path.indexOf( "target" );
+            workingDirectory = path.substring( 0, targetPos + 6 );
+    	}
+    	
     	File schemaRepository = new File( workingDirectory, "schema" );
         SchemaLdifExtractor extractor = new SchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();

Modified: directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java?rev=809654&r1=809653&r2=809654&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
Mon Aug 31 16:28:42 2009
@@ -97,7 +97,15 @@
     public static void setup() throws Exception
     {
     	String workingDirectory = System.getProperty( "workingDirectory" );
-    	File schemaRepository = new File( workingDirectory, "schema" );
+
+        if ( workingDirectory == null )
+        {
+            String path = DefaultServerAttributeTest.class.getResource( "" ).getPath();
+            int targetPos = path.indexOf( "target" );
+            workingDirectory = path.substring( 0, targetPos + 6 );
+        }
+
+        File schemaRepository = new File( workingDirectory, "schema" );
         SchemaLdifExtractor extractor = new SchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();
         loader = new LdifSchemaLoader( schemaRepository );

Modified: directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java?rev=809654&r1=809653&r2=809654&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerEntrySerializerTest.java
Mon Aug 31 16:28:42 2009
@@ -59,6 +59,14 @@
     public static void setup() throws Exception
     {
     	String workingDirectory = System.getProperty( "workingDirectory" );
+        
+    	if ( workingDirectory == null )
+        {
+            String path = DefaultServerAttributeTest.class.getResource( "" ).getPath();
+            int targetPos = path.indexOf( "target" );
+            workingDirectory = path.substring( 0, targetPos + 6 );
+        }
+    	
     	File schemaRepository = new File( workingDirectory, "schema" );
         SchemaLdifExtractor extractor = new SchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();

Modified: directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java?rev=809654&r1=809653&r2=809654&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-entry/src/test/java/org/apache/directory/server/core/entry/ServerModificationTest.java
Mon Aug 31 16:28:42 2009
@@ -149,6 +149,14 @@
     public static void setup() throws Exception
     {
     	String workingDirectory = System.getProperty( "workingDirectory" );
+    	
+        if ( workingDirectory == null )
+        {
+            String path = DefaultServerAttributeTest.class.getResource( "" ).getPath();
+            int targetPos = path.indexOf( "target" );
+            workingDirectory = path.substring( 0, targetPos + 6 );
+        }
+    	
     	File schemaRepository = new File( workingDirectory, "schema" );
         SchemaLdifExtractor extractor = new SchemaLdifExtractor( new File( workingDirectory
) );
         extractor.extractOrCopy();



Mime
View raw message