# HG changeset patch
# User stechong
# Date 1239910822 18000
# Node ID b7cd497951b75c707790b749c0df40878a7113d8
# Parent  3604ec4c983e6b2ae7a2cfc9400f28e75fdf637d
Updated JUnit tests for Bug 8890.

diff -r 3604ec4c983e -r b7cd497951b7 core/com.nokia.carbide.cpp.news.reader.tests/src/com/nokia/carbide/cpp/news/reader/tests/FeedManagerTest.java
--- a/core/com.nokia.carbide.cpp.news.reader.tests/src/com/nokia/carbide/cpp/news/reader/tests/FeedManagerTest.java	Thu Apr 16 14:39:51 2009 -0500
+++ b/core/com.nokia.carbide.cpp.news.reader.tests/src/com/nokia/carbide/cpp/news/reader/tests/FeedManagerTest.java	Thu Apr 16 14:40:22 2009 -0500
@@ -120,19 +120,20 @@
 		}
 	}
 
-	public void testRemoveNewsFeedEntry() {
+	public void testMarkEntryAsRead() {
 		try {
 			feedManager.loadFeeds();
 			List<CarbideSyndFeed> newsFeeds = feedManager.getNewsFeeds();
 			if (newsFeeds != null && newsFeeds.size() > 0) {
 				CarbideSyndFeed feed = newsFeeds.get(0);
-				List<CarbideSyndEntry> feedEntries = feed.getEntries();
-				if (feedEntries != null && feedEntries.size() > 0) {
+				List<CarbideSyndEntry> feedEntries = feed.getUnreadEntries();
+				while (feedEntries != null && feedEntries.size() > 0) {
 					int oldCount = feed.getUnreadEntries().size();
 					CarbideSyndEntry feedEntry = feedEntries.get(0);
-					feedManager.removeNewsFeedEntry(feedEntries, feedEntry.getTitle());
+					feedManager.markEntryAsRead(feedEntries, feedEntry.getTitle());
 					int newCount = feed.getUnreadEntries().size();
-					assertTrue(newCount > oldCount);
+					assertTrue(newCount < oldCount);
+					feedEntries = feed.getUnreadEntries();
 				}
 			}
 		} catch (Exception e) {