Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-02-13 18:12:01 -0500
committermkersten2007-02-13 18:12:01 -0500
commitc102ee5935f75cc8941f1cfb563b071b2dc499d7 (patch)
tree55c8e9f72354a98d30d11342b11cfb4b1082c736 /org.eclipse.mylyn.trac.tests
parent5f274da8f43c3ef71b33938ef7d219e1ee11efd4 (diff)
downloadorg.eclipse.mylyn.tasks-c102ee5935f75cc8941f1cfb563b071b2dc499d7.tar.gz
org.eclipse.mylyn.tasks-c102ee5935f75cc8941f1cfb563b071b2dc499d7.tar.xz
org.eclipse.mylyn.tasks-c102ee5935f75cc8941f1cfb563b071b2dc499d7.zip
NEW - bug 149624: [api] AbstractRepositoryTask repositoryUrl and task id should not be derived from handleIdentifier
https://bugs.eclipse.org/bugs/show_bug.cgi?id=149624
Diffstat (limited to 'org.eclipse.mylyn.trac.tests')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java2
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java2
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryHitTest.java2
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java2
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java2
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java4
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java54
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java6
8 files changed, 37 insertions, 37 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
index 8838bb48e..d8bb93ea0 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/RepositorySearchQueryTest.java
@@ -75,7 +75,7 @@ public class RepositorySearchQueryTest extends TestCase {
TracSearch search = new TracSearch();
String queryUrl = repository.getUrl() + ITracClient.QUERY_URL + search.toUrl();
- TracRepositoryQuery query = new TracRepositoryQuery(repository.getUrl(), queryUrl, "description", null);
+ TracRepositoryQuery query = new TracRepositoryQuery(repository.getUrl(), queryUrl, "summary", null);
SearchHitCollector collector = new SearchHitCollector(TasksUiPlugin.getTaskListManager()
.getTaskList(), repository, query) {
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java
index 38a8437dc..b6dd49f3e 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracAttachmentHandlerTest.java
@@ -124,7 +124,7 @@ public class TracAttachmentHandlerTest extends TestCase {
} finally {
out.close();
}
- attachmentHandler.uploadAttachment(repository, task, "comment", "description", file, "", false);
+ attachmentHandler.uploadAttachment(repository, task, "comment", "summary", file, "", false);
ITracClient client = connector.getClientManager().getRepository(repository);
byte[] result = client.getAttachmentData(data.attachmentTicketId, file.getName());
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryHitTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryHitTest.java
index 2ee96735d..444ce3e6f 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryHitTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryHitTest.java
@@ -25,7 +25,7 @@ public class TracQueryHitTest extends TestCase {
public void testAttributes() {
TaskList taskList = TasksUiPlugin.getTaskListManager().getTaskList();
- TracQueryHit hit = new TracQueryHit(taskList, "url", "description", "123");
+ TracQueryHit hit = new TracQueryHit(taskList, "url", "summary", "123");
hit.setPriority("P1");
hit.setCompleted(true);
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java
index a17f63605..75da280ed 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracQueryTest.java
@@ -24,7 +24,7 @@ public class TracQueryTest extends TestCase {
private TracRepositoryQuery createQuery(String parameter) {
String url = "http://oss.steffenpingel.de/mylar-trac-connector";
- return new TracRepositoryQuery(url, url + ITracClient.QUERY_URL + parameter, "description", null);
+ return new TracRepositoryQuery(url, url + ITracClient.QUERY_URL + parameter, "summary", null);
}
public void testGetTracSearch() {
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
index c39cc7c1f..328e8ae78 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryConnectorTest.java
@@ -189,7 +189,7 @@ public class TracRepositoryConnectorTest extends TestCase {
search.setOrderBy("id");
String queryUrl = url + ITracClient.QUERY_URL + search.toUrl();
- TracRepositoryQuery query = new TracRepositoryQuery(url, queryUrl, "description", tasklist);
+ TracRepositoryQuery query = new TracRepositoryQuery(url, queryUrl, "summary", tasklist);
//MultiStatus queryStatus = new MultiStatus(TracUiPlugin.PLUGIN_ID, IStatus.OK, "Query result", null);
final List<AbstractQueryHit> result = new ArrayList<AbstractQueryHit>();
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java
index 0bad6ef83..4b394b3ee 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracRepositoryQueryTest.java
@@ -40,7 +40,7 @@ public class TracRepositoryQueryTest extends TestCase {
TracSearch search = new TracSearch();
String queryUrl = repository.getUrl() + ITracClient.QUERY_URL + search.toUrl();
- TracRepositoryQuery query = new TracRepositoryQuery(repository.getUrl(), queryUrl, "description", TasksUiPlugin.getTaskListManager().getTaskList());
+ TracRepositoryQuery query = new TracRepositoryQuery(repository.getUrl(), queryUrl, "summary", TasksUiPlugin.getTaskListManager().getTaskList());
TasksUiPlugin.getTaskListManager().getTaskList().addQuery(query);
TracTask task = new TracTask(Constants.TEST_TRAC_096_URL, ""+123, "desc", true);
@@ -60,7 +60,7 @@ public class TracRepositoryQueryTest extends TestCase {
String repositoryUrl = "https://foo.bar/repo";
String parameterUrl = "&status=new&status=assigned&status=reopened&milestone=0.1";
String queryUrl = repositoryUrl + ITracClient.QUERY_URL + parameterUrl;
- TracRepositoryQuery query = new TracRepositoryQuery(repositoryUrl, queryUrl, "description", TasksUiPlugin.getTaskListManager().getTaskList());
+ TracRepositoryQuery query = new TracRepositoryQuery(repositoryUrl, queryUrl, "summary", TasksUiPlugin.getTaskListManager().getTaskList());
TracSearch filterList = query.getTracSearch();
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
index 61c5891e1..0f095b96e 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/TracXmlRpcTest.java
@@ -194,7 +194,7 @@ public class TracXmlRpcTest extends TestCase {
int completed = (int) (System.currentTimeMillis() / 1000);
Map<String, Object> attributes = new Hashtable<String, Object>();
- attributes.put("description", "description");
+ attributes.put("summary", "summary");
attributes.put("due", due);
attributes.put("completed", completed);
@@ -239,10 +239,10 @@ public class TracXmlRpcTest extends TestCase {
Map<String, Object> attributes = new Hashtable<String, Object>();
attributes.put("type", "task");
attributes.put("status", "closed");
- int id = createTicket("summary", "description", attributes);
+ int id = createTicket("summary", "summary", attributes);
attributes.put("summary", "summary");
- attributes.put("description", "description");
+ attributes.put("summary", "summary");
Object[] ticket = (Object[]) call("ticket.get", id);
assertTicketHasAttributes(attributes, id, ticket);
@@ -268,20 +268,20 @@ public class TracXmlRpcTest extends TestCase {
int id = createTicket("summaryńÍ▄", "▀▀▀", attributes);
attributes.put("summary", "summaryńÍ▄");
- attributes.put("description", "▀▀▀");
+ attributes.put("summary", "▀▀▀");
Object[] ticket = (Object[]) call("ticket.get", id);
assertTicketHasAttributes(attributes, id, ticket);
}
public void testUpdateTicket() throws XmlRpcException, IOException {
- int id = createTicket("summary", "description", new Hashtable<String, Object>());
+ int id = createTicket("summary", "summary", new Hashtable<String, Object>());
Map<String, Object> attributes = new Hashtable<String, Object>();
attributes.put("summary", "changed");
call("ticket.update", id, "my comment", attributes);
- attributes.put("description", "description");
+ attributes.put("summary", "summary");
Object[] ticket = (Object[]) call("ticket.get", id);
Map<?, ?> values = (Map<?, ?>) ticket[3];
@@ -293,7 +293,7 @@ public class TracXmlRpcTest extends TestCase {
public void testTicketCustomFields() throws XmlRpcException, IOException {
Map<String, Object> attributes = new Hashtable<String, Object>();
attributes.put("custom_text_field", "myvalue");
- int id = createTicket("summary", "description", attributes);
+ int id = createTicket("summary", "summary", attributes);
// check for default values
attributes.put("custom_checkbox_field", "1");
@@ -317,7 +317,7 @@ public class TracXmlRpcTest extends TestCase {
}
public void testGetChangeLog() throws XmlRpcException, IOException {
- int id = createTicket("summary", "description", new Hashtable<String, Object>());
+ int id = createTicket("summary", "summary", new Hashtable<String, Object>());
Map<String, Object> attributes = new Hashtable<String, Object>();
attributes.put("summary", "changed");
@@ -344,20 +344,20 @@ public class TracXmlRpcTest extends TestCase {
Object[] ticket = (Object[]) ((Object[]) ret[0])[0];
Map<String, Object> attributes = new Hashtable<String, Object>();
attributes.put("summary", "summary1");
- attributes.put("description", "description1");
+ attributes.put("summary", "description1");
assertTicketHasAttributes(attributes, id1, ticket);
ticket = (Object[]) ((Object[]) ret[1])[0];
attributes.clear();
attributes.put("summary", "summary2");
- attributes.put("description", "description2");
+ attributes.put("summary", "description2");
assertTicketHasAttributes(attributes, id2, ticket);
}
public void testAttachment() throws XmlRpcException, IOException {
- int id = createTicket("summary", "description", new Hashtable<String, Object>());
+ int id = createTicket("summary", "summary", new Hashtable<String, Object>());
- String filename = (String) call("ticket.putAttachment", id, "attach.txt", "description", "data".getBytes(),
+ String filename = (String) call("ticket.putAttachment", id, "attach.txt", "summary", "data".getBytes(),
true);
// the returned filename may differ, since another ticket may have an
// attachment named "attach.txt"
@@ -367,7 +367,7 @@ public class TracXmlRpcTest extends TestCase {
assertEquals(1, ret.length);
Object[] attachment = (Object[]) ret[0];
assertEquals("attach.txt", attachment[0]);
- assertEquals("description", attachment[1]);
+ assertEquals("summary", attachment[1]);
assertEquals(4, attachment[2]);
// date
assertEquals(username, attachment[4]);
@@ -393,7 +393,7 @@ public class TracXmlRpcTest extends TestCase {
data = new String(bytes);
assertEquals("newdata", data);
- String filename3 = (String) call("ticket.putAttachment", id, "attach.txt", "description", "data".getBytes(),
+ String filename3 = (String) call("ticket.putAttachment", id, "attach.txt", "summary", "data".getBytes(),
false);
assertFalse("attach.txt".equals(filename3));
ret = (Object[]) call("ticket.listAttachments", id);
@@ -401,9 +401,9 @@ public class TracXmlRpcTest extends TestCase {
}
public void testDeleteAttachment() throws XmlRpcException, IOException {
- int id = createTicket("summary", "description", new Hashtable<String, Object>());
+ int id = createTicket("summary", "summary", new Hashtable<String, Object>());
- String filename = (String) call("ticket.putAttachment", id, "attach.txt", "description", "data".getBytes(),
+ String filename = (String) call("ticket.putAttachment", id, "attach.txt", "summary", "data".getBytes(),
true);
Object[] ret = (Object[]) call("ticket.listAttachments", id);
@@ -416,12 +416,12 @@ public class TracXmlRpcTest extends TestCase {
}
public void testDuplicateAttachment() throws XmlRpcException, IOException {
- int id1 = createTicket("summary", "description", new Hashtable<String, Object>());
- int id2 = createTicket("summary", "description", new Hashtable<String, Object>());
+ int id1 = createTicket("summary", "summary", new Hashtable<String, Object>());
+ int id2 = createTicket("summary", "summary", new Hashtable<String, Object>());
- String filename1 = (String) call("ticket.putAttachment", id1, "attach.txt", "description", "data".getBytes(),
+ String filename1 = (String) call("ticket.putAttachment", id1, "attach.txt", "summary", "data".getBytes(),
true);
- String filename2 = (String) call("ticket.putAttachment", id2, "attach.txt", "description", "data2".getBytes(),
+ String filename2 = (String) call("ticket.putAttachment", id2, "attach.txt", "summary", "data2".getBytes(),
true);
assertEquals("attach.txt", filename1);
assertEquals(filename1, filename2);
@@ -441,8 +441,8 @@ public class TracXmlRpcTest extends TestCase {
call("ticket.delete", (Integer) id);
}
- int id1 = createTicket("foobarsum1", "description", new Hashtable<String, Object>());
- int id2 = createTicket("foobaz sum2", "description", new Hashtable<String, Object>());
+ int id1 = createTicket("foobarsum1", "summary", new Hashtable<String, Object>());
+ int id2 = createTicket("foobaz sum2", "summary", new Hashtable<String, Object>());
int id3 = createTicket("foobarbaz3", "foobarbaz description3", new Hashtable<String, Object>());
ret = (Object[]) call("ticket.query", "summary=foobarsum1|foobaz sum2");
@@ -458,13 +458,13 @@ public class TracXmlRpcTest extends TestCase {
ret = (Object[]) call("ticket.query", "summary~=bar|baz");
assertEquals(3, ret.length);
- ret = (Object[]) call("ticket.query", "description~=foobarbaz description3");
+ ret = (Object[]) call("ticket.query", "summary~=foobarbaz description3");
assertEquals(1, ret.length);
assertEquals(id3, ret[0]);
}
public void testQueryAll() throws XmlRpcException, IOException {
- int id = createTicket("foo", "description", new Hashtable<String, Object>());
+ int id = createTicket("foo", "summary", new Hashtable<String, Object>());
Object[] ret = (Object[]) call("ticket.query", "order=id");
assertTrue(ret.length > 0);
@@ -492,15 +492,15 @@ public class TracXmlRpcTest extends TestCase {
}
public void testVersions() throws XmlRpcException, IOException {
- internalTestComponent("ticket.version", "time", Integer.class, "description", String.class);
+ internalTestComponent("ticket.version", "time", Integer.class, "summary", String.class);
}
public void testComponents() throws XmlRpcException, IOException {
- internalTestComponent("ticket.component", "owner", String.class, "description", String.class);
+ internalTestComponent("ticket.component", "owner", String.class, "summary", String.class);
}
public void testMilestones() throws XmlRpcException, IOException {
- internalTestComponent("ticket.milestone", "due", Integer.class, "completed", Integer.class, "description",
+ internalTestComponent("ticket.milestone", "due", Integer.class, "completed", Integer.class, "summary",
String.class);
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java
index 02ae9ac9e..f3d65e60c 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java
@@ -340,11 +340,11 @@ public class XmlRpcServer {
}
public ModelEnum ticketComponent(String id) throws Exception {
- return new ModelEnum("ticket.component", id, "owner", "description");
+ return new ModelEnum("ticket.component", id, "owner", "summary");
}
public ModelEnum ticketMilestone(String id) throws Exception {
- return new ModelEnum("ticket.milestone", id, "due", "completed", "description");
+ return new ModelEnum("ticket.milestone", id, "due", "completed", "summary");
}
public TicketEnum ticketPriority(String id) throws Exception {
@@ -364,7 +364,7 @@ public class XmlRpcServer {
}
public ModelEnum ticketVersion(String id) throws Exception {
- return new ModelEnum("ticket.version", id, "time", "description");
+ return new ModelEnum("ticket.version", id, "time", "summary");
}
}

Back to the top