diff options
author | sminto | 2010-04-09 21:54:15 +0000 |
---|---|---|
committer | sminto | 2010-04-09 21:54:15 +0000 |
commit | 10ad05d21a5008c9125c21bdb24998435cebe346 (patch) | |
tree | 4d14a73d22ad90b860316ff97e3d0bd47e85a894 /org.eclipse.mylyn.tasks.tests | |
parent | e651ebf08342bb00541c78a99afdad2d30f1f56b (diff) | |
download | org.eclipse.mylyn.tasks-10ad05d21a5008c9125c21bdb24998435cebe346.tar.gz org.eclipse.mylyn.tasks-10ad05d21a5008c9125c21bdb24998435cebe346.tar.xz org.eclipse.mylyn.tasks-10ad05d21a5008c9125c21bdb24998435cebe346.zip |
ASSIGNED - bug 308703: sorting of repositories in the new task dropdown is incorrect for repositories without labels
https://bugs.eclipse.org/bugs/show_bug.cgi?id=308703
Diffstat (limited to 'org.eclipse.mylyn.tasks.tests')
-rw-r--r-- | org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositorySorterTest.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositorySorterTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositorySorterTest.java index 12d6835ce..46967dd5d 100644 --- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositorySorterTest.java +++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositorySorterTest.java @@ -47,6 +47,20 @@ public class TaskRepositorySorterTest extends TestCase { TaskRepository t2 = new TaskRepository("t", "http://b"); TaskRepository t3 = new TaskRepository("t", "http://c"); assertTrue(sorter.compare(null, t1, t2) < 0); + assertTrue(sorter.compare(null, t2, t3) < 0); + assertTrue(sorter.compare(null, t3, t1) > 0); + } + + public void testUrlSortingWithEmptyLabels() { + TaskRepositoriesSorter sorter = new TaskRepositoriesSorter(); + TaskRepository t1 = new TaskRepository("t", "http://a"); + t1.setProperty(IRepositoryConstants.PROPERTY_LABEL, ""); + TaskRepository t2 = new TaskRepository("t", "http://b"); + t2.setProperty(IRepositoryConstants.PROPERTY_LABEL, ""); + TaskRepository t3 = new TaskRepository("t", "http://c"); + t3.setProperty(IRepositoryConstants.PROPERTY_LABEL, ""); + assertTrue(sorter.compare(null, t1, t2) < 0); + assertTrue(sorter.compare(null, t2, t3) < 0); assertTrue(sorter.compare(null, t3, t1) > 0); } |