summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2011-12-05 17:10:38 (EST)
committerSteffen Pingel2011-12-05 17:10:38 (EST)
commit3dac4f8f714a378b38878adf017a8662cb583d3c (patch)
treec4c4d18bfd35f48eb70aaf1e71369b7645e56770
parent8b5d5214bc61fa256165b94e349dc57def9da44d (diff)
downloadorg.eclipse.mylyn.commons-3dac4f8f714a378b38878adf017a8662cb583d3c.zip
org.eclipse.mylyn.commons-3dac4f8f714a378b38878adf017a8662cb583d3c.tar.gz
org.eclipse.mylyn.commons-3dac4f8f714a378b38878adf017a8662cb583d3c.tar.bz2
RESOLVED - bug 361048: fix failing tests
https://bugs.eclipse.org/bugs/show_bug.cgi?id=361048 Change-Id: I9382f422c163805c41669261e1394ca1a7d15521
-rw-r--r--org.eclipse.mylyn.commons.notifications.feed/src/org/eclipse/mylyn/internal/commons/notifications/feed/FeedEntry.java1
-rw-r--r--org.eclipse.mylyn.commons.notifications.tests/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.mylyn.commons.notifications.tests/src/org/eclipse/mylyn/commons/notifications/tests/feed/FeedReaderTest.java2
-rw-r--r--org.eclipse.mylyn.commons.notifications.tests/testdata/FeedReaderTest/update1.xml41
-rw-r--r--org.eclipse.mylyn.discovery.tests/src/org/eclipse/mylyn/discovery/tests/core/ConnectorDiscoveryRemoteTest.java2
5 files changed, 45 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.commons.notifications.feed/src/org/eclipse/mylyn/internal/commons/notifications/feed/FeedEntry.java b/org.eclipse.mylyn.commons.notifications.feed/src/org/eclipse/mylyn/internal/commons/notifications/feed/FeedEntry.java
index ff3eedc..c4e0304 100644
--- a/org.eclipse.mylyn.commons.notifications.feed/src/org/eclipse/mylyn/internal/commons/notifications/feed/FeedEntry.java
+++ b/org.eclipse.mylyn.commons.notifications.feed/src/org/eclipse/mylyn/internal/commons/notifications/feed/FeedEntry.java
@@ -38,6 +38,7 @@ public class FeedEntry extends ServiceMessage {
}
setUrl(source.getLink());
setImage("dialog_messasge_info_image"); //$NON-NLS-1$
+ setDate(source.getPublishedDate());
}
public FeedEntry(String eventId) {
diff --git a/org.eclipse.mylyn.commons.notifications.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.commons.notifications.tests/META-INF/MANIFEST.MF
index 32336b7..f427a7d 100644
--- a/org.eclipse.mylyn.commons.notifications.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.commons.notifications.tests/META-INF/MANIFEST.MF
@@ -6,6 +6,7 @@ Bundle-Version: 3.7.0.qualifier
Bundle-Vendor: Eclipse Mylyn
Require-Bundle: org.eclipse.core.runtime,
org.junit,
+ org.eclipse.mylyn,
org.eclipse.mylyn.commons.sdk.util,
org.eclipse.mylyn.commons.notifications.core,
org.eclipse.mylyn.commons.notifications.feed
diff --git a/org.eclipse.mylyn.commons.notifications.tests/src/org/eclipse/mylyn/commons/notifications/tests/feed/FeedReaderTest.java b/org.eclipse.mylyn.commons.notifications.tests/src/org/eclipse/mylyn/commons/notifications/tests/feed/FeedReaderTest.java
index 8aa11d3..06fb279 100644
--- a/org.eclipse.mylyn.commons.notifications.tests/src/org/eclipse/mylyn/commons/notifications/tests/feed/FeedReaderTest.java
+++ b/org.eclipse.mylyn.commons.notifications.tests/src/org/eclipse/mylyn/commons/notifications/tests/feed/FeedReaderTest.java
@@ -51,7 +51,7 @@ public class FeedReaderTest extends TestCase {
FeedEntry entry = reader.getEntries().get(0);
assertEquals("New Connectors", entry.getTitle());
- assertEquals("[0.0.0,3.7.0)", entry.getFilter("frameworkVersion"));
+ assertEquals("[0.0.0,4.0.0)", entry.getFilter("frameworkVersion"));
assertEquals("New connectors are now available. <a href=\"#discovery\">Show connectors</a>.",
entry.getDescription());
diff --git a/org.eclipse.mylyn.commons.notifications.tests/testdata/FeedReaderTest/update1.xml b/org.eclipse.mylyn.commons.notifications.tests/testdata/FeedReaderTest/update1.xml
new file mode 100644
index 0000000..d66417d
--- /dev/null
+++ b/org.eclipse.mylyn.commons.notifications.tests/testdata/FeedReaderTest/update1.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ >
+<channel>
+<title>Mylyn Updates</title>
+<link>http://eclipse.org/mylyn</link>
+<description>Mylyn Updates</description>
+<lastBuildDate>Fri, 27 May 2011 17:33:37 +0000</lastBuildDate>
+<language>en</language>
+<item>
+<title>Mylyn 3.6 is now available</title>
+<link>http://eclipse.org/mylyn/new/</link>
+<pubDate>Fri, 27 May 2011 12:00:00 +0000</pubDate>
+<dc:creator>Steffen Pingel</dc:creator>
+<dc:subject>runtimeVersion=1.5.0</dc:subject>
+<dc:subject>requires=org.eclipse.mylyn</dc:subject>
+<category>Mylyn</category>
+<guid isPermaLink="false">20110527-0000</guid>
+<description>Mylyn 3.7 is now available. &lt;a href="http://eclipse.org/mylyn/new/"&gt;See New and Noteworthy&lt;/a&gt; for details.</description>
+</item>
+<item>
+<title>New Connectors</title>
+<link>http://eclipse.org/mylyn/new/</link>
+<pubDate>Thu, 24 Mar 2011 14:00:07 +0000</pubDate>
+<dc:creator>Steffen Pingel</dc:creator>
+<dc:subject>frameworkVersion=[0.0.0,4.0.0)</dc:subject>
+<guid isPermaLink="false">20110527-0001</guid>
+<description>New connectors are now available. &lt;a href="#discovery"&gt;Show connectors&lt;/a&gt;.</description>
+</item>
+<item>
+<title>Filtered Item</title>
+<link>http://eclipse.org/mylyn/new/</link>
+<pubDate>Fri, 27 May 2011 12:00:00 +0000</pubDate>
+<dc:creator>Steffen Pingel</dc:creator>
+<dc:subject>frameworkVersion=[1.0.0,2.0.0)</dc:subject>
+<guid isPermaLink="false">20110527-0002</guid>
+<description>Specifies an unsatisfiable framework version.</description>
+</item>
+</channel>
+</rss>
diff --git a/org.eclipse.mylyn.discovery.tests/src/org/eclipse/mylyn/discovery/tests/core/ConnectorDiscoveryRemoteTest.java b/org.eclipse.mylyn.discovery.tests/src/org/eclipse/mylyn/discovery/tests/core/ConnectorDiscoveryRemoteTest.java
index 267b942..f8a8d27 100644
--- a/org.eclipse.mylyn.discovery.tests/src/org/eclipse/mylyn/discovery/tests/core/ConnectorDiscoveryRemoteTest.java
+++ b/org.eclipse.mylyn.discovery.tests/src/org/eclipse/mylyn/discovery/tests/core/ConnectorDiscoveryRemoteTest.java
@@ -87,7 +87,7 @@ public class ConnectorDiscoveryRemoteTest extends TestCase {
private String computeUnavailableConnetorDescriptorNames() {
String message = "";
for (DiscoveryConnector connector : connectorDiscovery.getConnectors()) {
- if (!connector.getAvailable()) {
+ if (connector.getAvailable() != null && !connector.getAvailable()) {
if (message.length() > 0) {
message += ", ";
}