abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ckopp...@apache.org
Subject svn commit: r944820 - in /abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext: bidi/BidiTest.java history/FeedPagingTest.java thread/ThreadTest.java
Date Sun, 16 May 2010 12:35:59 GMT
Author: ckoppelt
Date: Sun May 16 12:35:59 2010
New Revision: 944820

URL: http://svn.apache.org/viewvc?rev=944820&view=rev
Log:
fix for ABDERA-102

Modified:
    abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/bidi/BidiTest.java
    abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/history/FeedPagingTest.java
    abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/thread/ThreadTest.java

Modified: abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/bidi/BidiTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/bidi/BidiTest.java?rev=944820&r1=944819&r2=944820&view=diff
==============================================================================
--- abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/bidi/BidiTest.java
(original)
+++ abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/bidi/BidiTest.java
Sun May 16 12:35:59 2010
@@ -40,24 +40,24 @@ public class BidiTest {
     BidiHelper.setDirection(Direction.LTR, feed.getSubtitleElement());
     
     assertNotNull(feed.getAttributeValue("dir"));
-    assertEquals(BidiHelper.getDirection(feed), Direction.RTL);
-    assertEquals(BidiHelper.getDirection(feed.getTitleElement()), Direction.RTL);
-    assertEquals(BidiHelper.getDirection(feed.getSubtitleElement()), Direction.LTR);
-    assertEquals(BidiHelper.getBidiElementText(feed.getTitleElement()), BidiHelper.getBidiText(Direction.RTL,
"Testing"));
-    assertEquals(BidiHelper.getBidiElementText(feed.getSubtitleElement()), BidiHelper.getBidiText(Direction.LTR,
"Testing"));
+    assertEquals(Direction.RTL, BidiHelper.getDirection(feed));
+    assertEquals(Direction.RTL, BidiHelper.getDirection(feed.getTitleElement()));
+    assertEquals(Direction.LTR, BidiHelper.getDirection(feed.getSubtitleElement()));
+    assertEquals(BidiHelper.getBidiText(Direction.RTL, "Testing"), BidiHelper.getBidiElementText(feed.getTitleElement()));
+    assertEquals(BidiHelper.getBidiText(Direction.LTR, "Testing"), BidiHelper.getBidiElementText(feed.getSubtitleElement()));
     
     Entry entry = abdera.newEntry();
     entry.setLanguage("az-arab");
-    assertEquals(BidiHelper.guessDirectionFromLanguage(entry), Direction.RTL);
+    assertEquals(Direction.RTL, BidiHelper.guessDirectionFromLanguage(entry));
     
     entry.setLanguage("az-latn");
-    assertEquals(BidiHelper.guessDirectionFromLanguage(entry), Direction.UNSPECIFIED);
+    assertEquals(Direction.UNSPECIFIED, BidiHelper.guessDirectionFromLanguage(entry));
     
     
-    assertEquals(BidiHelper.guessDirectionFromEncoding(entry), Direction.UNSPECIFIED);
+    assertEquals(Direction.UNSPECIFIED, BidiHelper.guessDirectionFromEncoding(entry));
     
     entry.getDocument().setCharset("iso-8859-6");
-    assertEquals(BidiHelper.guessDirectionFromEncoding(entry), Direction.RTL);
+    assertEquals(Direction.RTL, BidiHelper.guessDirectionFromEncoding(entry));
   }
   
 }

Modified: abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/history/FeedPagingTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/history/FeedPagingTest.java?rev=944820&r1=944819&r2=944820&view=diff
==============================================================================
--- abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/history/FeedPagingTest.java
(original)
+++ abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/history/FeedPagingTest.java
Sun May 16 12:35:59 2010
@@ -73,7 +73,7 @@ public class FeedPagingTest {
     assertNotNull(FeedPagingHelper.getPreviousArchive(feed));
     assertNotNull(FeedPagingHelper.getCurrent(feed));
     
-    assertEquals(FeedPagingHelper.getNext(feed).toString(),"http://example.org/bar");
+    assertEquals("http://example.org/bar", FeedPagingHelper.getNext(feed).toString());
   }
   
   @Test

Modified: abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/thread/ThreadTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/thread/ThreadTest.java?rev=944820&r1=944819&r2=944820&view=diff
==============================================================================
--- abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/thread/ThreadTest.java
(original)
+++ abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/thread/ThreadTest.java
Sun May 16 12:35:59 2010
@@ -44,7 +44,7 @@ public class ThreadTest {
     ThreadHelper.addInReplyTo(e2,e1); // e2 is a response to e1
     assertNotNull(e2.getExtension(ThreadConstants.IN_REPLY_TO));
     InReplyTo irt = e2.getExtension(ThreadConstants.IN_REPLY_TO);
-    assertEquals(irt.getRef(), e1.getId());
+    assertEquals(e1.getId(), irt.getRef());
     
   }
   



Mime
View raw message