Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2006-11-11 23:26:15 -0500
committerspingel2006-11-11 23:26:15 -0500
commitfd8f28e0d3d7904023bdfd28f4bc3fbce75fbb6c (patch)
tree61b38241b12ab4b758698eff611c7734f7084236 /org.eclipse.mylyn.trac.tests
parentca1aa514d748aef4ff44604bcd96c5712bcbb7ed (diff)
downloadorg.eclipse.mylyn.tasks-fd8f28e0d3d7904023bdfd28f4bc3fbce75fbb6c.tar.gz
org.eclipse.mylyn.tasks-fd8f28e0d3d7904023bdfd28f4bc3fbce75fbb6c.tar.xz
org.eclipse.mylyn.tasks-fd8f28e0d3d7904023bdfd28f4bc3fbce75fbb6c.zip
NEW - bug 162094: Repository Query by Milestone returns no result when MS name includes ampersand
https://bugs.eclipse.org/bugs/show_bug.cgi?id=162094
Diffstat (limited to 'org.eclipse.mylyn.trac.tests')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/Trac09ClientSearchTest.java16
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java4
2 files changed, 19 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/Trac09ClientSearchTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/Trac09ClientSearchTest.java
index 27c6b809f..ce1a5e29c 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/Trac09ClientSearchTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/Trac09ClientSearchTest.java
@@ -11,7 +11,12 @@
package org.eclipse.mylar.trac.tests;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.mylar.internal.trac.core.ITracClient.Version;
+import org.eclipse.mylar.internal.trac.core.model.TracSearch;
+import org.eclipse.mylar.internal.trac.core.model.TracTicket;
/**
* @author Steffen Pingel
@@ -22,4 +27,15 @@ public class Trac09ClientSearchTest extends AbstractTracClientSearchTest {
super(Version.TRAC_0_9);
}
+ // TODO move this test to AbstracTracClientTest when bug 162094 is resolved
+ public void testSearchMilestoneAmpersand() throws Exception {
+ TracSearch search = new TracSearch();
+ search.addFilter("milestone", "mile&stone");
+ search.setOrderBy("id");
+ List<TracTicket> result = new ArrayList<TracTicket>();
+ repository.search(search, result);
+ assertEquals(1, result.size());
+ assertTicketEquals(tickets.get(7), result.get(0));
+ }
+
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java
index 1b6872b35..847bb9659 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TestFixture.java
@@ -36,6 +36,7 @@ public class TestFixture {
server.ticketMilestone("milestone2").itemCreated();
server.ticketMilestone("milestone3").itemCreated();
server.ticketMilestone("milestone4").itemCreated();
+ server.ticketMilestone("mile&stone").itemCreated();
server.ticketVersion("1.0").itemCreated();
server.ticketVersion("2.0").itemCreated();
@@ -47,6 +48,7 @@ public class TestFixture {
server.ticket(5).itemCreated();
server.ticket(6).itemCreated();
server.ticket(7).itemCreated();
+ server.ticket(8).itemCreated();
}
// private static void initializeRepository(XmlRpcServer server) throws Exception {
@@ -71,7 +73,7 @@ public class TestFixture {
//
// ticket = server.ticket().create("attachment test", "");
// // create attachment named attachment.txt that contains the text "Mylar"
-// ticket = server.ticket().create("test html entities: ", "\n\nmulti\nline\n\n'''bold'''\n");
+// ticket = server.ticket().create("test html entities: ���", "���\n\nmulti\nline\n\n'''bold'''\n");
// ticket = server.ticket().create("offline handler test", "");
// }

Back to the top