directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1005462 - in /directory/studio/branches/shared-trunk-merge/plugins/schemaeditor: ./ src/main/java/org/apache/directory/studio/schemaeditor/model/difference/ src/test/java/org/apache/directory/studio/schemaeditor/model/difference/
Date Thu, 07 Oct 2010 14:25:51 GMT
Author: pamarcelot
Date: Thu Oct  7 14:25:51 2010
New Revision: 1005462

URL: http://svn.apache.org/viewvc?rev=1005462&view=rev
Log:
Fixed tests.

Modified:
    directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/pom.xml
    directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngine.java
    directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/src/test/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngineTest.java

Modified: directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/pom.xml?rev=1005462&r1=1005461&r2=1005462&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/pom.xml (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/pom.xml Thu Oct  7 14:25:51
2010
@@ -294,6 +294,18 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    
+  	<!-- SLF4J for test only -->
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
 </project>
\ No newline at end of file

Modified: directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngine.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngine.java?rev=1005462&r1=1005461&r2=1005462&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngine.java
(original)
+++ directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngine.java
Thu Oct  7 14:25:51 2010
@@ -777,19 +777,19 @@ public class DifferenceEngine
         long at1SyntaxLength = at1.getSyntaxLength();
         long at2SyntaxLength = at2.getSyntaxLength();
 
-        if ( ( at1SyntaxLength == -1 ) && ( at2SyntaxLength != -1 ) )
+        if ( ( at1SyntaxLength == 0 ) && ( at2SyntaxLength != 0 ) )
         {
             PropertyDifference diff = new SyntaxLengthDifference( at1, at2, DifferenceType.ADDED
);
             diff.setNewValue( at2SyntaxLength );
             return diff;
         }
-        else if ( ( at1SyntaxLength != -1 ) && ( at2SyntaxLength == -1 ) )
+        else if ( ( at1SyntaxLength != 0 ) && ( at2SyntaxLength == 0 ) )
         {
             PropertyDifference diff = new SyntaxLengthDifference( at1, at2, DifferenceType.REMOVED
);
             diff.setOldValue( at1SyntaxLength );
             return diff;
         }
-        else if ( ( at1SyntaxLength != -1 ) && ( at2SyntaxLength != -1 ) )
+        else if ( ( at1SyntaxLength != 0 ) && ( at2SyntaxLength != 0 ) )
         {
             if ( at1SyntaxLength != at2SyntaxLength )
             {

Modified: directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/src/test/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngineTest.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/src/test/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngineTest.java?rev=1005462&r1=1005461&r2=1005462&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/src/test/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngineTest.java
(original)
+++ directory/studio/branches/shared-trunk-merge/plugins/schemaeditor/src/test/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceEngineTest.java
Thu Oct  7 14:25:51 2010
@@ -328,7 +328,7 @@ public class DifferenceEngineTest extend
             fail();
         }
 
-        assertEquals( 1234, ( ( SyntaxLengthDifference ) difference ).getNewValue() );
+        assertEquals( 1234L, ( ( SyntaxLengthDifference ) difference ).getNewValue() );
     }
 
 
@@ -674,8 +674,8 @@ public class DifferenceEngineTest extend
             fail();
         }
 
-        assertEquals( 1234, ( ( SyntaxLengthDifference ) difference ).getOldValue() );
-        assertEquals( 12345, ( ( SyntaxLengthDifference ) difference ).getNewValue() );
+        assertEquals( 1234L, ( ( SyntaxLengthDifference ) difference ).getOldValue() );
+        assertEquals( 12345L, ( ( SyntaxLengthDifference ) difference ).getNewValue() );
     }
 
 
@@ -1018,7 +1018,7 @@ public class DifferenceEngineTest extend
             fail();
         }
 
-        assertEquals( 1234, ( ( SyntaxLengthDifference ) difference ).getOldValue() );
+        assertEquals( 1234L, ( ( SyntaxLengthDifference ) difference ).getOldValue() );
         assertNull( ( ( SyntaxLengthDifference ) difference ).getNewValue() );
     }
 }



Mime
View raw message