Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.trac.tests/src')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java5
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java16
2 files changed, 18 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
index 917367f86..6d05b5aa6 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
@@ -64,7 +64,9 @@ public class TracFixture extends TestFixture {
public static TracFixture TRAC_0_11_XML_RPC = new TracFixture(Version.XML_RPC, TracTestConstants.TEST_TRAC_011_URL,
"0.11", "XML-RPC");
- public static TracFixture DEFAULT = TRAC_0_11_XML_RPC;
+ //public static TracFixture DEFAULT = TRAC_0_11_XML_RPC;
+
+ public static TracFixture DEFAULT = TRAC_0_11_WEB;
public static final TracFixture[] ALL = new TracFixture[] { TRAC_0_9_WEB, TRAC_0_10_WEB, TRAC_0_11_WEB,
TRAC_0_10_XML_RPC, TRAC_0_11_XML_RPC, };
@@ -182,6 +184,7 @@ public class TracFixture extends TestFixture {
return version;
}
+ @Override
public TaskRepository singleRepository() {
TracCorePlugin.getDefault().getConnector().getClientManager().writeCache();
TaskRepositoryManager manager = TasksUiPlugin.getRepositoryManager();
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java
index 8e2904535..999ac0c48 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java
@@ -93,8 +93,20 @@ public class TracTestUtil {
Map<?, ?> expectedValues = ticket.getValues();
Map<String, String> values = tracTicket.getValues();
for (String key : values.keySet()) {
- Assert.assertEquals("Values for key '" + key + "' did not match", expectedValues.get(key), values.get(key));
+ Object expected = expectedValues.get(key);
+ String actual = values.get(key);
+ if (key.equals("reporter")) {
+ // Trac 0.11 obfuscates email addresses by replacing the domain with the Ellipses character,
+ // mangle expected value accordingly
+ if (actual != null && actual.endsWith("\u2026") && expected instanceof String) {
+ String expectedString = (String) expected;
+ int i = expectedString.indexOf("@");
+ if (i != -1) {
+ expected = expectedString.substring(0, i + 1) + "\u2026";
+ }
+ }
+ }
+ Assert.assertEquals("Values for key '" + key + "' did not match", expected, actual);
}
}
-
}

Back to the top