summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2013-04-11 23:29:41 (EDT)
committerSteffen Pingel2013-04-12 17:36:18 (EDT)
commit9272712034cda71f10525c6fb0dec3a3be321adb (patch)
tree9ab65f35c34fed171e03e574d7c43fb82dea358e
parent0fc792d196e825bc409f6b7be6e8d883d792ba38 (diff)
downloadorg.eclipse.mylyn.tasks-9272712034cda71f10525c6fb0dec3a3be321adb.zip
org.eclipse.mylyn.tasks-9272712034cda71f10525c6fb0dec3a3be321adb.tar.gz
org.eclipse.mylyn.tasks-9272712034cda71f10525c6fb0dec3a3be321adb.tar.bz2
400396: re-enable disabled Trac testsrefs/changes/40/11840/5
Change-Id: I32852bb6266cc1709bd970643102f2fcd81ff016 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=400396
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java5
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearchFilter.java6
-rw-r--r--org.eclipse.mylyn.trac.releng/modules/trac/manifests/defaultsites.pp1
-rw-r--r--org.eclipse.mylyn.trac.releng/modules/trac/templates/service.json.erb2
-rw-r--r--org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF8
-rw-r--r--org.eclipse.mylyn.trac.tests/local.json.example11
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java2
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java17
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientProxyTest.java9
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java55
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java233
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcTest.java4
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryQueryTest.java8
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracUtilTest.java3
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java140
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracHarness.java17
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestCleanupUtil.java6
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestConstants.java39
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/XmlRpcServer.java43
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java37
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracTaskEditorTest.java59
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/.classpath7
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/.project34
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.core.runtime.prefs2
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.jdt.core.prefs396
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.jdt.ui.prefs62
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.mylyn.team.ui.prefs2
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.pde.prefs18
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/META-INF/MANIFEST.MF14
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/about.html27
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/build.properties6
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/pom.xml22
-rw-r--r--org.eclipse.mylyn.trac.ui.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilStandaloneTest.java (renamed from org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilStandaloneTest.java)14
-rw-r--r--pom.xml1
36 files changed, 850 insertions, 467 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java
index 67fcee3..09022b5 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracXmlRpcClient.java
@@ -1196,6 +1196,11 @@ public class TracXmlRpcClient extends AbstractTracClient implements ITracWikiCli
return result.booleanValue();
}
+ public boolean deleteWikipage(String pageName, IProgressMonitor monitor) throws TracException {
+ Boolean result = (Boolean) call(monitor, "wiki.deletePage", pageName); //$NON-NLS-1$
+ return result.booleanValue();
+ }
+
public String[] listWikiPageAttachments(String pageName, IProgressMonitor monitor) throws TracException {
Object[] result = (Object[]) call(monitor, "wiki.listAttachments", pageName); //$NON-NLS-1$
String[] attachments = new String[result.length];
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearchFilter.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearchFilter.java
index 4421131..d7482ae 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearchFilter.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearchFilter.java
@@ -85,6 +85,12 @@ public class TracSearchFilter {
this.fieldName = fieldName;
}
+ public TracSearchFilter(String fieldName, CompareOperator operator, String value) {
+ this(fieldName);
+ setOperator(operator);
+ addValue(value);
+ }
+
public void addValue(String value) {
values.add(value);
}
diff --git a/org.eclipse.mylyn.trac.releng/modules/trac/manifests/defaultsites.pp b/org.eclipse.mylyn.trac.releng/modules/trac/manifests/defaultsites.pp
index 6b1e3c1..b52b0e5 100644
--- a/org.eclipse.mylyn.trac.releng/modules/trac/manifests/defaultsites.pp
+++ b/org.eclipse.mylyn.trac.releng/modules/trac/manifests/defaultsites.pp
@@ -106,6 +106,7 @@ define trac::defaultsites ($base = $trac::base, $userOwner = $trac::userOwner, $
}
trac::site { "trac-test":
+ envinfo => "Test",
}
} \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.releng/modules/trac/templates/service.json.erb b/org.eclipse.mylyn.trac.releng/modules/trac/templates/service.json.erb
index 41d4d8e..403818f 100644
--- a/org.eclipse.mylyn.trac.releng/modules/trac/templates/service.json.erb
+++ b/org.eclipse.mylyn.trac.releng/modules/trac/templates/service.json.erb
@@ -10,6 +10,8 @@
"tags": [
<% if @envinfo == "DigestAuth" || @envinfo == "FormAuth" %>
"misc"
+<% elsif @envinfo == "Test" %>
+ "test"
<% end %>
],
"properties":{
diff --git a/org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF
index f2c5507..218dcf6 100644
--- a/org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.trac.tests/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: Mylyn Trac Connector Tests
Bundle-SymbolicName: org.eclipse.mylyn.trac.tests;singleton:=true
Bundle-Version: 3.9.0.qualifier
-Require-Bundle: org.junit,
+Require-Bundle: org.junit;bundle-version="4.8.2",
org.eclipse.core.runtime,
org.eclipse.jface.text,
org.eclipse.search,
@@ -19,9 +19,9 @@ Require-Bundle: org.junit,
org.eclipse.mylyn.trac.ui,
org.apache.ws.commons.util;bundle-version="1.0.0",
org.apache.xmlrpc;bundle-version="3.0.0",
- org.eclipse.ui.forms
-Export-Package: org.eclipse.mylyn.internal.trac.ui;x-internal:=true,
- org.eclipse.mylyn.trac.tests;x-internal:=true,
+ org.eclipse.ui.forms,
+ org.apache.commons.lang;bundle-version="2.6.0"
+Export-Package: org.eclipse.mylyn.trac.tests;x-internal:=true,
org.eclipse.mylyn.trac.tests.client;x-internal:=true,
org.eclipse.mylyn.trac.tests.core;x-internal:=true,
org.eclipse.mylyn.trac.tests.support;x-internal:=true,
diff --git a/org.eclipse.mylyn.trac.tests/local.json.example b/org.eclipse.mylyn.trac.tests/local.json.example
new file mode 100644
index 0000000..6e5ceaa
--- /dev/null
+++ b/org.eclipse.mylyn.trac.tests/local.json.example
@@ -0,0 +1,11 @@
+[
+{
+ "type": "trac",
+ "url": "http://localhost:2080/trac-1.0/",
+ "version": "1.0",
+ "info": "XML-RPC",
+ "properties":{
+ "version": "XML_RPC"
+ }
+}
+]
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java
index 610cbc8..6c70e5c 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracHeadlessStandaloneTests.java
@@ -53,7 +53,7 @@ public class AllTracHeadlessStandaloneTests {
fixture.add(TracClientFactoryTest.class);
fixture.add(TracClientTest.class);
fixture.done();
- } else {
+ } else if (!fixture.hasTag(TracFixture.TAG_TEST)) {
addTests(suite, fixture);
}
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
index 54ce57d..62f7bd5 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
@@ -31,6 +31,7 @@ import org.eclipse.mylyn.trac.tests.core.TracUtilTest;
import org.eclipse.mylyn.trac.tests.support.TracFixture;
import org.eclipse.mylyn.trac.tests.support.TracTestCleanupUtil;
import org.eclipse.mylyn.trac.tests.ui.TracHyperlinkUtilTest;
+import org.eclipse.mylyn.trac.tests.ui.TracRepositorySettingsPageTest;
/**
* @author Mik Kersten
@@ -51,17 +52,13 @@ public class AllTracTests {
}
public static void addTests(TestSuite suite, TestConfiguration configuration) {
- // FIXME re-enable
- //suite.addTest(AllTracHeadlessStandaloneTests.suite(configuration));
+ suite.addTest(AllTracHeadlessStandaloneTests.suite(configuration));
suite.addTestSuite(TracUtilTest.class);
- // FIXME move test to tasks framework
- //suite.addTestSuite(TracTaskEditorTest.class);
suite.addTestSuite(TracHyperlinkUtilTest.class);
if (!configuration.isLocalOnly()) {
suite.addTestSuite(TracRepositoryQueryTest.class);
- // FIXME re-enable
- //suite.addTestSuite(TracRepositorySettingsPageTest.class);
+ suite.addTestSuite(TracRepositorySettingsPageTest.class);
// network tests
List<TracFixture> fixtures = configuration.discover(TracFixture.class, "trac");
for (TracFixture fixture : fixtures) {
@@ -74,6 +71,10 @@ public class AllTracTests {
protected static void addTests(TestSuite suite, TestConfiguration configuration, TracFixture fixture) {
fixture.createSuite(suite);
+ if (configuration.hasKind(TestKind.INTEGRATION) && !configuration.isLocalOnly()
+ && CommonTestUtil.hasCredentials(PrivilegeLevel.ADMIN)) {
+ fixture.add(TracTestCleanupUtil.class);
+ }
fixture.add(TracRepositoryConnectorTest.class);
if (fixture.getAccessMode() == Version.XML_RPC) {
fixture.add(TracTaskDataHandlerXmlRpcTest.class);
@@ -81,10 +82,6 @@ public class AllTracTests {
} else {
fixture.add(TracRepositoryConnectorWebTest.class);
}
- if (configuration.hasKind(TestKind.INTEGRATION) && !configuration.isLocalOnly()
- && CommonTestUtil.hasCredentials(PrivilegeLevel.ADMIN)) {
- suite.addTest(new TracTestCleanupUtil(fixture, fixture.getInfo()));
- }
fixture.done();
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientProxyTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientProxyTest.java
index fd78177..03a6937 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientProxyTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientProxyTest.java
@@ -25,7 +25,6 @@ import org.eclipse.mylyn.internal.trac.core.client.ITracClient;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient.Version;
import org.eclipse.mylyn.internal.trac.core.client.TracException;
import org.eclipse.mylyn.trac.tests.support.TestProxy;
-import org.eclipse.mylyn.trac.tests.support.TracTestConstants;
/**
* @author Steffen Pingel
@@ -60,22 +59,22 @@ public class TracClientProxyTest extends TestCase {
public void testConnectProxyWeb() throws Exception {
version = Version.TRAC_0_9;
- connectProxy(TracTestConstants.TEST_TRAC_010_URL, "GET");
+ connectProxy("http://mylyn.org/trac", "GET");
}
public void testConnectProxyXmlRpc() throws Exception {
version = Version.XML_RPC;
- connectProxy(TracTestConstants.TEST_TRAC_010_URL, "POST");
+ connectProxy("http://mylyn.org/trac", "POST");
}
public void testConnectProxySslWeb() throws Exception {
version = Version.TRAC_0_9;
- connectProxy(TracTestConstants.TEST_TRAC_010_SSL_URL, "CONNECT");
+ connectProxy("https://mylyn.org/trac", "CONNECT");
}
public void testConnectProxySslXmlRpc() throws Exception {
version = Version.XML_RPC;
- connectProxy(TracTestConstants.TEST_TRAC_010_SSL_URL, "CONNECT");
+ connectProxy("https://mylyn.org/trac", "CONNECT");
}
private void connectProxy(String url, String expectedMethod) throws Exception {
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java
index 9389f0f..db64b28 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java
@@ -21,6 +21,7 @@ import java.util.List;
import junit.framework.TestCase;
+import org.apache.commons.lang.RandomStringUtils;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.mylyn.commons.repositories.core.auth.UserCredentials;
import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
@@ -33,6 +34,8 @@ import org.eclipse.mylyn.internal.trac.core.client.TracLoginException;
import org.eclipse.mylyn.internal.trac.core.client.TracPermissionDeniedException;
import org.eclipse.mylyn.internal.trac.core.client.TracRemoteException;
import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
+import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter;
+import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter.CompareOperator;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
import org.eclipse.mylyn.internal.trac.core.model.TracTicketField;
@@ -40,8 +43,6 @@ import org.eclipse.mylyn.internal.trac.core.model.TracVersion;
import org.eclipse.mylyn.trac.tests.support.TracFixture;
import org.eclipse.mylyn.trac.tests.support.TracHarness;
import org.eclipse.mylyn.trac.tests.support.TracTestUtil;
-import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.TestData;
-import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.Ticket;
/**
* Test cases for classes that implement {@link ITracClient}.
@@ -52,12 +53,8 @@ public class TracClientTest extends TestCase {
private ITracClient client;
- private TestData data;
-
private TracFixture fixture;
- protected List<Ticket> tickets;
-
private TracHarness harness;
public TracClientTest() {
@@ -68,8 +65,6 @@ public class TracClientTest extends TestCase {
fixture = TracFixture.current();
harness = fixture.createHarness();
client = fixture.connect();
- data = TracFixture.init010();
- tickets = data.tickets;
}
@Override
@@ -79,7 +74,7 @@ public class TracClientTest extends TestCase {
public void testGetTicket() throws Exception {
TracTicket expectedTicket = harness.createTicket("getTicket");
- TracTicket ticket = client.getTicket(tickets.get(0).getId(), null);
+ TracTicket ticket = client.getTicket(expectedTicket.getId(), null);
TracTestUtil.assertTicketEquals(expectedTicket, ticket);
}
@@ -92,9 +87,12 @@ public class TracClientTest extends TestCase {
}
public void testGetTicketUmlaute() throws Exception {
- TracTicket ticket = client.getTicket(data.htmlEntitiesTicketId, null);
+ TracTicket ticket = harness.createTicket("test html entities: \u00E4\u00F6\u00FC");
assertEquals("test html entities: \u00E4\u00F6\u00FC", ticket.getValue(Key.SUMMARY));
if (client.getAccessMode() == Version.XML_RPC) {
+ ticket.putBuiltinValue(Key.DESCRIPTION, "\u00C4\u00D6\u00DC\n\nmulti\nline\n\n'''bold'''\n");
+ client.updateTicket(ticket, "", null);
+ ticket = client.getTicket(ticket.getId(), null);
assertEquals("\u00C4\u00D6\u00DC\n\nmulti\nline\n\n'''bold'''\n", ticket.getValue(Key.DESCRIPTION));
} else {
assertEquals(null, ticket.getValue(Key.DESCRIPTION));
@@ -128,23 +126,28 @@ public class TracClientTest extends TestCase {
}
public void testSearchExactMatch() throws Exception {
+ String uniqueTag = RandomStringUtils.randomAlphanumeric(6);
+ String summary = "searchExactMatch " + uniqueTag;
+ TracTicket ticket = harness.createTicketWithMilestone(summary, "milestone1");
+
TracSearch search = new TracSearch();
search.addFilter("milestone", "milestone1");
- search.addFilter("summary", "summary1");
+ search.addFilter("summary", summary);
List<TracTicket> result = new ArrayList<TracTicket>();
client.search(search, result, null);
assertEquals(1, result.size());
- TracTestUtil.assertTicketEquals(tickets.get(0), result.get(0));
+ TracTestUtil.assertTicketEquals(ticket, result.get(0));
assertEquals("milestone1", result.get(0).getValue(Key.MILESTONE));
- assertEquals("summary1", result.get(0).getValue(Key.SUMMARY));
+ assertEquals(summary, result.get(0).getValue(Key.SUMMARY));
}
public void testSearchMilestone1() throws Exception {
- TracTicket ticket = harness.createTicketWithMilestone("searchMilestone1", "milestone1");
- harness.createTicketWithMilestone("searchMilestone1", "milestone2");
+ String uniqueTag = RandomStringUtils.randomAlphanumeric(6);
+ TracTicket ticket = harness.createTicketWithMilestone("searchMilestone1" + uniqueTag, "milestone1");
+ harness.createTicketWithMilestone("searchMilestone1" + uniqueTag, "milestone2");
TracSearch search = new TracSearch();
- search.addFilter("summary", "searchMilestone1");
+ search.addFilter(new TracSearchFilter("summary", CompareOperator.CONTAINS, uniqueTag));
search.addFilter("milestone", "milestone1");
search.addFilter("milestone", "milestone1");
List<TracTicket> result = new ArrayList<TracTicket>();
@@ -154,11 +157,13 @@ public class TracClientTest extends TestCase {
}
public void testSearchMilestone2() throws Exception {
- TracTicket ticket1 = harness.createTicketWithMilestone("searchMilestone2", "milestone1");
- TracTicket ticket2 = harness.createTicketWithMilestone("searchMilestone2", "milestone1");
- TracTicket ticket3 = harness.createTicketWithMilestone("searchMilestone2", "milestone2");
+ String uniqueTag = RandomStringUtils.randomAlphanumeric(6);
+ TracTicket ticket1 = harness.createTicketWithMilestone("searchMilestone2 " + uniqueTag, "milestone1");
+ TracTicket ticket2 = harness.createTicketWithMilestone("searchMilestone2 " + uniqueTag, "milestone1");
+ TracTicket ticket3 = harness.createTicketWithMilestone("searchMilestone2 " + uniqueTag, "milestone2");
TracSearch search = new TracSearch();
+ search.addFilter(new TracSearchFilter("summary", CompareOperator.CONTAINS, uniqueTag));
search.addFilter("milestone", "milestone1");
search.addFilter("milestone", "milestone2");
search.setOrderBy("id");
@@ -171,6 +176,9 @@ public class TracClientTest extends TestCase {
}
public void testSearchMilestoneAmpersand() throws Exception {
+ harness.createMilestone("mile&stone");
+ TracTicket ticket = harness.createTicketWithMilestone("searchMilestoneAmpersand", "mile&stone");
+
TracSearch search = new TracSearch();
search.addFilter("milestone", "mile&stone");
search.setOrderBy("id");
@@ -178,7 +186,7 @@ public class TracClientTest extends TestCase {
try {
client.search(search, result, null);
assertEquals(1, result.size());
- TracTestUtil.assertTicketEquals(tickets.get(7), result.get(0));
+ TracTestUtil.assertTicketEquals(ticket, result.get(0));
} catch (TracRemoteException e) {
if ("'Query filter requires field and constraints separated by a \"=\"' while executing 'ticket.query()'".equals(e.getMessage())
&& (fixture.getVersion().equals("0.10") || fixture.getVersion().equals("0.11"))) {
@@ -190,7 +198,12 @@ public class TracClientTest extends TestCase {
}
public void testStatusClosed() throws Exception {
- TracTicket ticket = client.getTicket(data.offlineHandlerTicketId, null);
+ TracTicket ticket = harness.createTicket("statusClosed");
+ ticket.putBuiltinValue(Key.STATUS, "closed");
+ ticket.putBuiltinValue(Key.RESOLUTION, "fixed");
+ client.updateTicket(ticket, "", null);
+
+ ticket = client.getTicket(ticket.getId(), null);
assertEquals("closed", ticket.getValue(Key.STATUS));
assertEquals("fixed", ticket.getValue(Key.RESOLUTION));
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java
index af5273a..670d483 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java
@@ -20,14 +20,16 @@ import java.util.List;
import junit.framework.TestCase;
+import org.apache.commons.lang.RandomStringUtils;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.internal.trac.core.client.ITracClient;
import org.eclipse.mylyn.internal.trac.core.client.TracException;
import org.eclipse.mylyn.internal.trac.core.client.TracPermissionDeniedException;
import org.eclipse.mylyn.internal.trac.core.client.TracRemoteException;
import org.eclipse.mylyn.internal.trac.core.client.TracXmlRpcClient;
import org.eclipse.mylyn.internal.trac.core.model.TracAction;
import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
+import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter;
+import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter.CompareOperator;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
import org.eclipse.mylyn.internal.trac.core.model.TracTicketField;
@@ -36,10 +38,7 @@ import org.eclipse.mylyn.internal.trac.core.model.TracWikiPage;
import org.eclipse.mylyn.internal.trac.core.model.TracWikiPageInfo;
import org.eclipse.mylyn.trac.tests.support.TracFixture;
import org.eclipse.mylyn.trac.tests.support.TracHarness;
-import org.eclipse.mylyn.trac.tests.support.TracTestConstants;
import org.eclipse.mylyn.trac.tests.support.TracTestUtil;
-import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.TestData;
-import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.Ticket;
/**
* @author Steffen Pingel
@@ -47,11 +46,9 @@ import org.eclipse.mylyn.trac.tests.support.XmlRpcServer.Ticket;
*/
public class TracXmlRpcClientTest extends TestCase {
- protected List<Ticket> tickets;
+ private static final int VERY_HIGH_REVISION = 100000;
- private TestData data;
-
- private ITracClient client;
+ private TracXmlRpcClient client;
private TracHarness harness;
@@ -59,9 +56,7 @@ public class TracXmlRpcClientTest extends TestCase {
protected void setUp() throws Exception {
TracFixture fixture = TracFixture.current();
harness = fixture.createHarness();
- client = fixture.connect();
- data = TracFixture.init010();
- tickets = data.tickets;
+ client = (TracXmlRpcClient) fixture.connect();
}
@Override
@@ -70,17 +65,17 @@ public class TracXmlRpcClientTest extends TestCase {
}
public void testValidateFailNoAuth() throws Exception {
- client = TracFixture.current().connect(TracTestConstants.TEST_TRAC_010_URL, "", "");
+ client = (TracXmlRpcClient) TracFixture.current().connect(client.getUrl(), "", "");
try {
client.validate(new NullProgressMonitor());
- fail("Expected TracPermissiongDeniedException");
+ fail("Expected TracPermissionDeniedException");
} catch (TracPermissionDeniedException e) {
}
}
public void testMulticallExceptions() throws Exception {
try {
- ((TracXmlRpcClient) client).getTickets(new int[] { 1, Integer.MAX_VALUE }, null);
+ client.getTickets(new int[] { 1, Integer.MAX_VALUE }, null);
fail("Expected TracRemoteException");
} catch (TracRemoteException e) {
}
@@ -88,7 +83,7 @@ public class TracXmlRpcClientTest extends TestCase {
public void testSingleCallExceptions() throws Exception {
try {
- ((TracXmlRpcClient) client).getTicketLastChanged(Integer.MAX_VALUE, null);
+ client.getTicketLastChanged(Integer.MAX_VALUE, null);
fail("Expected TracRemoteException");
} catch (TracRemoteException e) {
}
@@ -113,79 +108,67 @@ public class TracXmlRpcClientTest extends TestCase {
}
public void testSearchValidateTicket() throws Exception {
+ String uniqueTag = RandomStringUtils.randomAlphanumeric(6);
+ TracTicket ticket = harness.createTicket("searchValidateTicket " + uniqueTag);
+ ticket.putBuiltinValue(Key.COMPONENT, "component1");
+ ticket.putBuiltinValue(Key.DESCRIPTION, "description1");
+ ticket.putBuiltinValue(Key.MILESTONE, "milestone1");
+ ticket.putBuiltinValue(Key.REPORTER, "anonymous");
+ client.updateTicket(ticket, "", null);
+
TracSearch search = new TracSearch();
- search.addFilter("summary", "summary1");
+ search.addFilter(new TracSearchFilter("summary", CompareOperator.CONTAINS, uniqueTag));
List<TracTicket> result = new ArrayList<TracTicket>();
client.search(search, result, null);
assertEquals(1, result.size());
- TracTestUtil.assertTicketEquals(tickets.get(0), result.get(0));
- assertEquals("component1", result.get(0).getValue(Key.COMPONENT));
- assertEquals("description1", result.get(0).getValue(Key.DESCRIPTION));
- assertEquals("milestone1", result.get(0).getValue(Key.MILESTONE));
- assertEquals("anonymous", result.get(0).getValue(Key.REPORTER));
- assertEquals("summary1", result.get(0).getValue(Key.SUMMARY));
- // assertEquals("", result.get(0).getValue(Key.VERSION));
+ // work around missing value
+ ticket.putBuiltinValue(Key.OWNER, "somebody");
+ TracTestUtil.assertTicketEquals(ticket, result.get(0));
}
public void testGetTicketActions() throws Exception {
- if (client.getUrl().equals(TracTestConstants.TEST_TRAC_010_URL)) {
- TracTicket ticket = client.getTicket(tickets.get(0).getId(), null);
- TracAction[] actions = ticket.getActions();
- assertNotNull(actions);
- assertEquals(4, actions.length);
- assertEquals("leave", actions[0].getId());
- assertNull(actions[0].getLabel());
- assertEquals(0, actions[0].getFields().size());
- assertEquals("resolve", actions[1].getId());
- assertNull(actions[1].getLabel());
- assertEquals(0, actions[1].getFields().size());
- assertEquals("reassign", actions[2].getId());
- assertNull(actions[2].getLabel());
- assertEquals(0, actions[2].getFields().size());
- assertEquals("accept", actions[3].getId());
- assertNull(actions[3].getLabel());
- assertEquals(0, actions[3].getFields().size());
-
- ticket = client.getTicket(tickets.get(1).getId(), null);
- actions = ticket.getActions();
- assertNotNull(actions);
- assertEquals(2, actions.length);
- assertEquals("leave", actions[0].getId());
- assertEquals("reopen", actions[1].getId());
- } else {
- TracTicket ticket = client.getTicket(tickets.get(0).getId(), null);
- TracAction[] actions = ticket.getActions();
- assertNotNull(actions);
- assertEquals(4, actions.length);
- assertEquals("leave", actions[0].getId());
- assertEquals("resolve", actions[1].getId());
- assertEquals("resolve", actions[1].getLabel());
- assertNotNull(actions[1].getHint());
- List<TracTicketField> fields = actions[1].getFields();
- assertEquals(1, fields.size());
- assertEquals(5, fields.get(0).getOptions().length);
- assertEquals("fixed", fields.get(0).getOptions()[0]);
- assertEquals("reassign", actions[2].getId());
- fields = actions[2].getFields();
- assertEquals(1, fields.size());
- assertNull(fields.get(0).getOptions());
- assertEquals("accept", actions[3].getId());
-
- ticket = client.getTicket(tickets.get(1).getId(), null);
- actions = ticket.getActions();
- assertNotNull(actions);
- assertEquals(2, actions.length);
- assertEquals("leave", actions[0].getId());
- assertEquals("reopen", actions[1].getId());
- }
+ TracTicket ticket = harness.createTicket("getTicketActions");
+ TracAction[] actions = ticket.getActions();
+ assertNotNull(actions);
+ assertEquals(4, actions.length);
+ assertEquals("leave", actions[0].getId());
+ assertEquals("resolve", actions[1].getId());
+ assertEquals("resolve", actions[1].getLabel());
+ assertNotNull(actions[1].getHint());
+ List<TracTicketField> fields = actions[1].getFields();
+ assertEquals(1, fields.size());
+ assertEquals(5, fields.get(0).getOptions().length);
+ assertEquals("fixed", fields.get(0).getOptions()[0]);
+ assertEquals("reassign", actions[2].getId());
+ fields = actions[2].getFields();
+ assertEquals(1, fields.size());
+ assertNull(fields.get(0).getOptions());
+ assertEquals("accept", actions[3].getId());
+ }
+
+ public void testGetTicketActionsClosed() throws Exception {
+ TracTicket ticket = harness.createTicket("getTicketActionsClosed");
+ ticket.putBuiltinValue(Key.STATUS, "closed");
+ ticket.putBuiltinValue(Key.RESOLUTION, "fixed");
+ client.updateTicket(ticket, "", null);
+
+ ticket = client.getTicket(ticket.getId(), null);
+ TracAction[] actions = ticket.getActions();
+ assertNotNull(actions);
+ assertEquals(2, actions.length);
+ assertEquals("leave", actions[0].getId());
+ assertEquals("reopen", actions[1].getId());
}
public void testWikiToHtml() throws Exception {
String tracUrl = client.getUrl();
- String html = ((TracXmlRpcClient) client).wikiToHtml("", null);
+ if (tracUrl.endsWith("/")) {
+ tracUrl = tracUrl.substring(0, tracUrl.length() - 1);
+ }
+ String html = client.wikiToHtml("", null);
assertEquals("", html);
- html = ((TracXmlRpcClient) client).wikiToHtml("A simple line of text.", null);
+ html = client.wikiToHtml("A simple line of text.", null);
assertEquals("<p>\nA simple line of text.\n</p>\n", html);
String source = "= WikiFormattingTesting =\n" + " * '''bold''', '''!''' can be bold too''', and '''! '''\n"
@@ -204,23 +187,27 @@ public class TracXmlRpcClientTest extends TestCase {
+ tracUrl
+ "/wiki/WikiFormattingTesting\" rel=\"nofollow\">WikiFormattingTesting?</a></h1>\n<ul><li><strong>bold</strong>, <strong>\'\'\' can be bold too</strong>, and <strong>! </strong>\n</li><li><i>italic</i>\n</li><li><strong><i>bold italic</i></strong>\n</li><li><span class=\"underline\">underline</span>\n</li><li><tt>monospace</tt> or <tt>monospace</tt>\n</li><li><del>strike-through</del>\n</li><li><sup>superscript</sup> \n</li><li><sub>subscript</sub>\n</li></ul><h1 id=\"Heading\">Heading</h1>\n<h2 id=\"Subheading\">Subheading</h2>\n";
}
- html = ((TracXmlRpcClient) client).wikiToHtml(source, null);
+ html = client.wikiToHtml(source, null);
assertEquals(expectedHtml, html);
}
public void testValidateWikiAPI() throws Exception {
- ((TracXmlRpcClient) client).validateWikiRpcApi(null);
+ client.validateWikiRpcApi(null);
}
public void testGetAllWikiPageNames() throws Exception {
- String[] names = ((TracXmlRpcClient) client).getAllWikiPageNames(null);
+ String[] names = client.getAllWikiPageNames(null);
List<String> all = Arrays.asList(names);
assertTrue(all.contains("Test"));
}
public void testGetWikiPage() throws Exception {
- TracWikiPage page = ((TracXmlRpcClient) client).getWikiPage("TestGetPage", null);
- assertEquals("TestGetPage", page.getPageInfo().getPageName());
+ String pageName = "TestGetPage" + RandomStringUtils.randomAlphanumeric(6);
+ harness.createWikiPage(pageName, "Version 1");
+ harness.createWikiPage(pageName, "Version 2");
+
+ TracWikiPage page = client.getWikiPage(pageName, null);
+ assertEquals(pageName, page.getPageInfo().getPageName());
assertEquals("tests@mylyn.eclipse.org", page.getPageInfo().getAuthor());
assertEquals(2, page.getPageInfo().getVersion());
// XXX The Date returned from Wiki API seems to have a problem with the Time Zone
@@ -229,109 +216,121 @@ public class TracXmlRpcClientTest extends TestCase {
assertEquals("Version 2", page.getContent());
assertTrue(page.getPageHTML().startsWith("<html>"));
- page = ((TracXmlRpcClient) client).getWikiPage("TestGetPage", 1, null);
- assertEquals("TestGetPage", page.getPageInfo().getPageName());
- assertEquals("anonymous", page.getPageInfo().getAuthor());
+ page = client.getWikiPage(pageName, 1, null);
+ assertEquals(pageName, page.getPageInfo().getPageName());
+ assertEquals("tests@mylyn.eclipse.org", page.getPageInfo().getAuthor());
assertEquals(1, page.getPageInfo().getVersion());
assertEquals("Version 1", page.getContent());
assertTrue(page.getPageHTML().startsWith("<html>"));
}
- public void testGetWikiPageInvalid() throws Exception {
- // get info -- non-existing version
+ public void testGetWikiPageInfoInvalidRevision() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPageInfo("Test", 10, null);
+ client.getWikiPageInfo("Test", VERY_HIGH_REVISION, null);
fail("Expected TracRemoteException");
} catch (TracRemoteException e) {
}
+ }
- // get info -- non-existing page name
+ public void testGetWikiPageInfoInvalidPage() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPageInfo("NoSuchPage", null);
+ client.getWikiPageInfo("NoSuchPage", null);
fail("Expected TracRemoteException");
} catch (TracRemoteException e) {
}
+ }
- // get info -- null parameter
+ public void testGetWikiPageInfoNull() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPageInfo(null, null);
+ client.getWikiPageInfo(null, null);
fail("Expected RuntimeException");
} catch (IllegalArgumentException e) {
}
+ }
- // get content -- non-existing version
+ public void testGetWikiPageContentInvalidRevision() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPageContent("Test", 10, null);
+ client.getWikiPageContent("Test", VERY_HIGH_REVISION, null);
fail("Expected TracRemoteException");
} catch (TracRemoteException e) {
}
+ }
- // get content -- non-existing page name
+ public void testGetWikiPageContentInvalidPage() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPageContent("NoSuchPage", null);
+ client.getWikiPageContent("NoSuchPage", null);
fail("Expected TracRemoteException");
} catch (TracRemoteException e) {
}
+ }
- // get content -- null parameter
+ public void testGetWikiPageContentContentNull() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPageContent(null, null);
+ client.getWikiPageContent(null, null);
fail("Expected RuntimeException");
} catch (IllegalArgumentException e) {
}
+ }
- // get HTML -- non-existing version
+ public void testGetWikiPageHtmlInvalidRevision() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPageHtml("Test", 10, null);
+ client.getWikiPageHtml("Test", VERY_HIGH_REVISION, null);
fail("Expected TracRemoteException");
} catch (TracRemoteException e) {
}
+ }
- // get HTML -- non-existing page name
+ public void testGetWikiPageHtmlInvalidPage() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPageHtml("NoSuchPage", null);
+ client.getWikiPageHtml("NoSuchPage", null);
fail("Expected TracRemoteException");
} catch (TracRemoteException e) {
}
+ }
- // get HTML -- null parameter
+ public void testGetWikiPageHtmlNull() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPageHtml(null, null);
+ client.getWikiPageHtml(null, null);
fail("Expected RuntimeException");
} catch (IllegalArgumentException e) {
}
+ }
- // get a page -- non-existing version
+ public void testGetWikiPageInvalidRevision() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPage("Test", 10, null);
+ client.getWikiPage("Test", VERY_HIGH_REVISION, null);
fail("Expected TracRemoteException");
} catch (TracRemoteException e) {
}
+ }
- // get a page -- non-existing page name
+ public void testGetWikiPageInvalidPage() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPage("NoSuchPage", null);
+ client.getWikiPage("NoSuchPage", null);
fail("Expected TracRemoteException");
} catch (TracRemoteException e) {
}
+ }
- // get a page -- null parameter
+ public void testGetWikiPageNull() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPage(null, null);
+ client.getWikiPage(null, null);
fail("Expected RuntimeException");
} catch (IllegalArgumentException e) {
}
+ }
- // get all versions of a page -- non-existing page name
+ public void testGetWikiInfoAllVersionsInvalidPage() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPageInfoAllVersions("NoSuchPage", null);
+ client.getWikiPageInfoAllVersions("NoSuchPage", null);
fail("Expected TracRemoteException");
} catch (TracRemoteException e) {
}
+ }
- // get all versions of a page -- null parameter
+ public void testGetWikiInfoAllVersionsInvalidPageNull() throws Exception {
try {
- ((TracXmlRpcClient) client).getWikiPageInfoAllVersions(null, null);
+ client.getWikiPageInfoAllVersions(null, null);
fail("Expected RuntimeException");
} catch (IllegalArgumentException e) {
}
@@ -339,8 +338,9 @@ public class TracXmlRpcClientTest extends TestCase {
public void testGetWikiPageInfoAllVersions() throws Exception {
String pageName = "Test";
+ harness.createWikiPage(pageName, "test content " + RandomStringUtils.randomAlphanumeric(6));
- TracWikiPageInfo[] versions = ((TracXmlRpcClient) client).getWikiPageInfoAllVersions(pageName, null);
+ TracWikiPageInfo[] versions = client.getWikiPageInfoAllVersions(pageName, null);
assertTrue(versions.length >= 1);
int counter = 1;
for (TracWikiPageInfo version : versions) {
@@ -350,7 +350,8 @@ public class TracXmlRpcClientTest extends TestCase {
}
public void testGetRecentWikiChanges() throws Exception {
- TracWikiPageInfo[] changes = ((TracXmlRpcClient) client).getRecentWikiChanges(new Date(0), null);
+ harness.createWikiPage("Test", "test content " + RandomStringUtils.randomAlphanumeric(6));
+ TracWikiPageInfo[] changes = client.getRecentWikiChanges(new Date(0), null);
TracWikiPageInfo testPage = null;
for (TracWikiPageInfo item : changes) {
assertTrue(item.getPageName() != null);
@@ -361,10 +362,6 @@ public class TracXmlRpcClientTest extends TestCase {
assertTrue(testPage != null);
}
- public void testPutWikiPage() throws Exception {
- // TODO testing wiki.putPage()
- }
-
public void testInvalidCharacters() throws Exception {
TracTicket ticket = harness.createTicket("invalid characters");
ticket.putBuiltinValue(Key.DESCRIPTION, "Control Character: \u0002");
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcTest.java
index 8843c0c..fe6ea46 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcTest.java
@@ -30,7 +30,7 @@ import org.eclipse.mylyn.commons.repositories.core.auth.UserCredentials;
import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil.PrivilegeLevel;
import org.eclipse.mylyn.internal.trac.core.util.TracHttpClientTransportFactory;
-import org.eclipse.mylyn.trac.tests.support.TracTestConstants;
+import org.eclipse.mylyn.trac.tests.support.TracFixture;
/**
* Test cases for <a href="http://trac-hacks.org/wiki/XmlRpcPlugin">Trac XML-RPC Plugin</a> (revision 1188 or higher is
@@ -62,7 +62,7 @@ public class TracXmlRpcTest extends TestCase {
random = new Random();
UserCredentials credentials = CommonTestUtil.getCredentials(PrivilegeLevel.ADMIN);
- createConnection(new URL(TracTestConstants.TEST_TRAC_010_URL + XMLRPC_URL), credentials.getUserName(),
+ createConnection(new URL(TracFixture.current().getRepositoryUrl() + XMLRPC_URL), credentials.getUserName(),
credentials.getPassword());
tickets = new ArrayList<Integer>();
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryQueryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryQueryTest.java
index 41570ef..523b20b 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryQueryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracRepositoryQueryTest.java
@@ -17,14 +17,13 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
import org.eclipse.mylyn.internal.tasks.ui.RefactorRepositoryUrlOperation;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
+import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient;
import org.eclipse.mylyn.internal.trac.core.model.TracSearch;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.trac.tests.support.TracFixture;
-import org.eclipse.mylyn.trac.tests.support.TracTestConstants;
/**
* @author Steffen Pingel
@@ -32,7 +31,7 @@ import org.eclipse.mylyn.trac.tests.support.TracTestConstants;
public class TracRepositoryQueryTest extends TestCase {
public void testChangeRepositoryUrl() throws Exception {
- TaskRepository repository = TracFixture.TRAC_0_12_XML_RPC.singleRepository();
+ TaskRepository repository = new TaskRepository(TracCorePlugin.CONNECTOR_KIND, "http://mylyn.org/trac-one");
TracSearch search = new TracSearch();
String queryUrl = repository.getRepositoryUrl() + ITracClient.QUERY_URL + search.toUrl();
@@ -46,7 +45,7 @@ public class TracRepositoryQueryTest extends TestCase {
TasksUiPlugin.getTaskList().addTask(task);
String oldUrl = repository.getRepositoryUrl();
- String newUrl = TracTestConstants.TEST_TRAC_010_URL;
+ String newUrl = "http://mylyn.org/trac-two";
new RefactorRepositoryUrlOperation(oldUrl, newUrl).run(new NullProgressMonitor());
repository.setRepositoryUrl(newUrl);
@@ -54,4 +53,5 @@ public class TracRepositoryQueryTest extends TestCase {
assertEquals(newUrl + ITracClient.QUERY_URL + search.toUrl(), query.getUrl());
assertEquals(newUrl + ITracClient.TICKET_URL + taskId, task.getUrl());
}
+
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracUtilTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracUtilTest.java
index 0fe8640..ab622f9 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracUtilTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/core/TracUtilTest.java
@@ -24,7 +24,6 @@ import org.eclipse.mylyn.internal.trac.core.util.TracUtil;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.trac.tests.support.TracTestConstants;
/**
* @author Steffen Pingel
@@ -35,7 +34,7 @@ public class TracUtilTest extends TestCase {
@Override
protected void setUp() throws Exception {
- taskRepository = new TaskRepository(TracCorePlugin.CONNECTOR_KIND, TracTestConstants.TEST_TRAC_010_URL);
+ taskRepository = new TaskRepository(TracCorePlugin.CONNECTOR_KIND, "http://mylyn.org/trac");
}
public void testToTracSearch() {
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 c8d4587..8d1eecf 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
@@ -23,6 +23,7 @@ import org.eclipse.mylyn.commons.repositories.core.auth.UserCredentials;
import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil.PrivilegeLevel;
import org.eclipse.mylyn.commons.sdk.util.FixtureConfiguration;
+import org.eclipse.mylyn.commons.sdk.util.TestConfiguration;
import org.eclipse.mylyn.internal.trac.core.TracClientFactory;
import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
@@ -42,81 +43,9 @@ public class TracFixture extends TestFixture {
public static String TAG_MISC = "misc";
- private static TracFixture current;
-
- public static XmlRpcServer.TestData data010;
-
- public static TracFixture TRAC_INVALID = new TracFixture(Version.TRAC_0_9, TracTestConstants.TEST_TRAC_INVALID_URL,
- "0.11", "Invalid URL");
-
-// public static TracFixture TRAC_0_9_WEB = new TracFixture(Version.TRAC_0_9, TracTestConstants.TEST_TRAC_096_URL,
-// "0.9", "Web");
-
- public static TracFixture TRAC_0_10_WEB = new TracFixture(Version.TRAC_0_9, TracTestConstants.TEST_TRAC_010_URL,
- "0.10", "Web");
-
- public static TracFixture TRAC_0_10_XML_RPC = new TracFixture(Version.XML_RPC, TracTestConstants.TEST_TRAC_010_URL,
- "0.10", "XML-RPC");
-
- public static TracFixture TRAC_0_10_XML_RPC_DIGEST_AUTH = new TracFixture(Version.XML_RPC,
- TracTestConstants.TEST_TRAC_010_DIGEST_AUTH_URL, "0.10", "XML-RPC/DigestAuth");
-
- public static TracFixture TRAC_0_10_XML_RPC_FORM_AUTH = new TracFixture(Version.XML_RPC,
- TracTestConstants.TEST_TRAC_010_FORM_AUTH_URL, "0.10", "XML-RPC/FormAuth");
-
- public static TracFixture TRAC_0_10_XML_RPC_SSL = new TracFixture(Version.XML_RPC,
- TracTestConstants.TEST_TRAC_010_SSL_URL, "0.10", "XML-RPC/SSL");
-
- public static TracFixture TRAC_0_11_WEB = new TracFixture(Version.TRAC_0_9, TracTestConstants.TEST_TRAC_011_URL,
- "0.11", "Web");
-
- 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 TRAC_0_12_WEB = new TracFixture(Version.TRAC_0_9, TracTestConstants.TEST_TRAC_012_URL,
- "0.12", "Web");
-
- public static TracFixture TRAC_0_12_XML_RPC = new TracFixture(Version.XML_RPC, TracTestConstants.TEST_TRAC_012_URL,
- "0.12", "XML-RPC");
-
- public static TracFixture TRAC_1_0_WEB = new TracFixture(Version.TRAC_0_9, TracTestConstants.TEST_TRAC_10_URL,
- "1.0", "Web");
-
- public static TracFixture TRAC_1_0_XML_RPC = new TracFixture(Version.XML_RPC, TracTestConstants.TEST_TRAC_10_URL,
- "1.0", "XML-RPC");
-
- public static TracFixture TRAC_TRUNK_WEB = new TracFixture(Version.TRAC_0_9, TracTestConstants.TEST_TRAC_TRUNK_URL,
- "0.12dev-r0", "Web");
-
- public static TracFixture TRAC_TRUNK_XML_RPC = new TracFixture(Version.XML_RPC,
- TracTestConstants.TEST_TRAC_TRUNK_URL, "0.13dev-r0", "XML-RPC");
+ public static final String TAG_TEST = "test";
- public static TracFixture DEFAULT = TRAC_1_0_XML_RPC;
-
- //public static TracFixture DEFAULT = TRAC_0_11_WEB;
-
- /**
- * Standard configurations for running all test against.
- */
- public static final TracFixture[] ALL = new TracFixture[] { TRAC_0_10_WEB, TRAC_0_11_WEB, TRAC_0_12_WEB,
- /*TRAC_TRUNK_WEB, */TRAC_0_10_XML_RPC, TRAC_0_11_XML_RPC, TRAC_0_12_XML_RPC, TRAC_1_0_WEB, TRAC_1_0_XML_RPC, /*TRAC_TRUNK_XML_RPC, TRAC_0_10_XML_RPC_SSL, */};
-
-// public static final TracFixture[] ALL = new TracFixture[] { TRAC_TRUNK_XML_RPC };
-
- /**
- * Misc configurations for running a limited number of test against.
- */
- public static final TracFixture[] MISC = new TracFixture[] { TRAC_0_10_XML_RPC_DIGEST_AUTH,
- TRAC_0_10_XML_RPC_FORM_AUTH, };
-
-// public static final TracFixture[] MISC = new TracFixture[] {};
-
- public static void cleanup010() throws Exception {
- if (data010 != null) {
- // data010.cleanup();
- data010 = null;
- }
- }
+ private static TracFixture current;
public static TracFixture current(TracFixture fixture) {
if (current == null) {
@@ -126,42 +55,7 @@ public class TracFixture extends TestFixture {
}
public static TracFixture current() {
- return current(DEFAULT);
- }
-
- public static XmlRpcServer.TestData init010() throws Exception {
- if (data010 == null) {
- UserCredentials credentials = CommonTestUtil.getCredentials(PrivilegeLevel.USER);
- XmlRpcServer server = new XmlRpcServer(TracTestConstants.TEST_TRAC_010_URL, credentials.getUserName(),
- credentials.getPassword());
-
- initializeTestData(server);
- data010 = server.getData();
- }
- return data010;
- }
-
- /**
- * Adds the existing repository content to the test data of <code>server</code>.
- */
- protected static void initializeTestData(XmlRpcServer server) throws Exception {
- server.ticketMilestone("milestone1").itemCreated();
- 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();
-
- server.ticket(1).itemCreated();
- server.ticket(2).itemCreated();
- server.ticket(3).itemCreated();
- server.ticket(4).itemCreated();
- server.ticket(5).itemCreated();
- server.ticket(6).itemCreated();
- server.ticket(7).itemCreated();
- server.ticket(8).itemCreated();
+ return current(TestConfiguration.getDefault().discoverDefault(TracFixture.class, "trac"));
}
private final Version accessMode;
@@ -197,7 +91,7 @@ public class TracFixture extends TestFixture {
@Override
protected TestFixture getDefault() {
- return DEFAULT;
+ return TestConfiguration.getDefault().discoverDefault(TracFixture.class, "trac");
}
public ITracClient connect() throws Exception {
@@ -295,28 +189,4 @@ public class TracFixture extends TestFixture {
return tags.contains(tag);
}
-// private static void initializeRepository(XmlRpcServer server) throws Exception {
-// server.ticketVersion(null).deleteAll();
-// server.ticketVersion("1.0").create(0, "");
-// server.ticketVersion("2.0").create(0, "");
-//
-// server.ticketMilestone(null).deleteAll();
-// server.ticketMilestone("milestone1").create();
-// server.ticketMilestone("milestone2").create();
-// server.ticketMilestone("milestone3").create();
-// server.ticketMilestone("milestone4").create();
-//
-// server.ticket().deleteAll();
-// Ticket ticket = server.ticket().create("summary1", "description1");
-// ticket.update("comment", "milestone", "milestone1");
-// ticket = server.ticket().create("summary2", "description2");
-// ticket.update("comment", "milestone", "milestone2");
-// ticket = server.ticket().create("summary3", "description3");
-// ticket.update("comment", "milestone", "milestone2");
-// ticket = server.ticket().create("summary4", "description4");
-//
-// ticket = server.ticket().create("test html entities: ���", "���\n\nmulti\nline\n\n'''bold'''\n");
-// ticket = server.ticket().create("offline handler test", "");
-//}
-
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracHarness.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracHarness.java
index 93a9eb1..eb3dfcf 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracHarness.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracHarness.java
@@ -12,14 +12,15 @@
package org.eclipse.mylyn.trac.tests.support;
import java.io.ByteArrayInputStream;
+import java.util.Collections;
import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil.PrivilegeLevel;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
-import org.eclipse.mylyn.internal.trac.core.client.ITracClient;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient.Version;
import org.eclipse.mylyn.internal.trac.core.client.InvalidTicketException;
import org.eclipse.mylyn.internal.trac.core.client.TracException;
+import org.eclipse.mylyn.internal.trac.core.client.TracXmlRpcClient;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
import org.eclipse.mylyn.tasks.core.ITask;
@@ -31,7 +32,7 @@ public class TracHarness {
private final TracFixture fixture;
- private ITracClient priviledgedClient;
+ private TracXmlRpcClient priviledgedClient;
private TaskRepository repository;
@@ -43,9 +44,9 @@ public class TracHarness {
return fixture;
}
- private ITracClient priviledgedClient() throws Exception {
+ private TracXmlRpcClient priviledgedClient() throws Exception {
if (priviledgedClient == null) {
- priviledgedClient = fixture.connectXmlRpc(PrivilegeLevel.USER);
+ priviledgedClient = (TracXmlRpcClient) fixture.connectXmlRpc(PrivilegeLevel.USER);
}
return priviledgedClient;
}
@@ -67,6 +68,10 @@ public class TracHarness {
return ticket;
}
+ public void createMilestone(String milestone) throws Exception {
+ new XmlRpcServer(priviledgedClient()).ticketMilestone(milestone).deleteAndCreate();
+ }
+
public TracTicket createTicketWithMilestone(String summary, String milestone) throws Exception {
TracTicket ticket = newTicket(summary);
ticket.putBuiltinValue(Key.MILESTONE, milestone);
@@ -119,4 +124,8 @@ public class TracHarness {
return Version.XML_RPC.name().equals(repository().getVersion());
}
+ public void createWikiPage(String pageName, String content) throws Exception {
+ priviledgedClient().putWikipage(pageName, content, Collections.<String, Object> emptyMap(), null);
+ }
+
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestCleanupUtil.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestCleanupUtil.java
index c5fc4d3..39b9424 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestCleanupUtil.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestCleanupUtil.java
@@ -47,7 +47,13 @@ public class TracTestCleanupUtil extends TestCase {
return data;
}
+ public TracTestCleanupUtil(String name) {
+ super(name);
+ this.fixture = TracFixture.current();
+ }
+
public TracTestCleanupUtil(TracFixture fixture, String name) {
+ super(name);
this.fixture = fixture;
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestConstants.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestConstants.java
deleted file mode 100644
index 8708e05..0000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestConstants.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2010 Steffen Pingel and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Steffen Pingel - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests.support;
-
-import org.eclipse.mylyn.commons.sdk.util.TestConfiguration;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTestConstants {
-
- public static final String TEST_TRAC_010_URL = TestConfiguration.getRepositoryUrl("trac010");
-
- public static final String TEST_TRAC_010_SSL_URL = TestConfiguration.getRepositoryUrl("trac010", true);
-
- public static final String TEST_TRAC_010_DIGEST_AUTH_URL = TestConfiguration.getRepositoryUrl("trac010digest");
-
- public static final String TEST_TRAC_010_FORM_AUTH_URL = TestConfiguration.getRepositoryUrl("trac010formauth");
-
- public static final String TEST_TRAC_011_URL = TestConfiguration.getRepositoryUrl("trac-0.11.7");
-
- public static final String TEST_TRAC_012_URL = TestConfiguration.getRepositoryUrl("trac-0.12.5");
-
- public static final String TEST_TRAC_10_URL = TestConfiguration.getRepositoryUrl("trac-1.0");
-
- public static final String TEST_TRAC_TRUNK_URL = TestConfiguration.getRepositoryUrl("trac-trunk");
-
- public static final String TEST_TRAC_INVALID_URL = TestConfiguration.getRepositoryUrl("doesnotexist");
-
-}
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 2bdc219..75a8fff 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
@@ -12,7 +12,6 @@
package org.eclipse.mylyn.trac.tests.support;
import java.io.IOException;
-import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Hashtable;
@@ -22,8 +21,6 @@ import java.util.Vector;
import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.client.XmlRpcClient;
-import org.eclipse.mylyn.commons.net.WebLocation;
-import org.eclipse.mylyn.internal.trac.core.client.ITracClient.Version;
import org.eclipse.mylyn.internal.trac.core.client.TracXmlRpcClient;
/**
@@ -129,12 +126,6 @@ public class XmlRpcServer {
// all created tickets
public List<Ticket> tickets = new ArrayList<Ticket>();
- public int attachmentTicketId = 5;
-
- public int htmlEntitiesTicketId = 6;
-
- public int offlineHandlerTicketId = 7;
-
/**
* Undo all changes.
*/
@@ -276,23 +267,9 @@ public class XmlRpcServer {
private final TestData data;
- private final String password;
-
- private final TracXmlRpcClient repository;
-
- private final String url;
-
- private final String username;
-
- public XmlRpcServer(String url, String username, String password) throws Exception {
- this.url = url;
- this.username = username;
- this.password = password;
-
+ public XmlRpcServer(TracXmlRpcClient client) throws Exception {
+ this.client = client.getClient();
this.data = new TestData();
-
- this.repository = new TracXmlRpcClient(new WebLocation(url, username, password), Version.XML_RPC);
- this.client = repository.getClient();
}
private Object call(String method, Object... parameters) throws XmlRpcException, IOException {
@@ -312,22 +289,6 @@ public class XmlRpcServer {
return data;
}
- public String getPassword() {
- return password;
- }
-
- public TracXmlRpcClient getRepository() throws MalformedURLException {
- return repository;
- }
-
- public String getUrl() {
- return url;
- }
-
- public String getUsername() {
- return username;
- }
-
public Ticket ticket() throws Exception {
return new Ticket(null);
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java
index bad8bd4..701cf26 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracRepositorySettingsPageTest.java
@@ -20,6 +20,7 @@ import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.mylyn.commons.net.AuthenticationType;
+import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiExtensionReader;
import org.eclipse.mylyn.internal.tasks.ui.wizards.EditRepositoryWizard;
import org.eclipse.mylyn.internal.trac.core.TracRepositoryConnector;
import org.eclipse.mylyn.internal.trac.core.client.ITracClient;
@@ -65,6 +66,8 @@ public class TracRepositorySettingsPageTest extends TestCase {
private WizardDialog dialog;
+ private TracFixture fixture;
+
public TracRepositorySettingsPageTest() {
}
@@ -86,6 +89,8 @@ public class TracRepositorySettingsPageTest extends TestCase {
dialog.create();
// page.createControl(dialog.getShell());
// page.setVisible(true);
+
+ fixture = TracFixture.current();
}
@Override
@@ -107,32 +112,20 @@ public class TracRepositorySettingsPageTest extends TestCase {
validator = page.new TracValidator(page.createTaskRepository(), fixture.getAccessMode());
}
- public void testValidateXmlRpc() throws Exception {
- initialize(TracFixture.TRAC_0_10_XML_RPC);
-
- validator.run(new NullProgressMonitor());
- assertNull(validator.getResult());
- assertNull(validator.getStatus());
-
- page.applyValidatorResult(validator);
- assertEquals(Version.XML_RPC, page.getTracVersion());
- assertEquals("Authentication credentials are valid.", page.getMessage());
- }
-
- public void testValidateWeb() throws Exception {
- initialize(TracFixture.TRAC_0_10_WEB);
+ public void testValidate() throws Exception {
+ initialize(fixture);
validator.run(new NullProgressMonitor());
assertNull(validator.getResult());
assertNull(validator.getStatus());
page.applyValidatorResult(validator);
- assertEquals(Version.TRAC_0_9, page.getTracVersion());
+ assertEquals(fixture.getAccessMode(), page.getTracVersion());
assertEquals("Authentication credentials are valid.", page.getMessage());
}
public void testValidateAutomaticUser() throws Exception {
- initialize(TracFixture.TRAC_0_10_XML_RPC);
+ initialize(fixture);
page.setTracVersion(null);
validator = page.new TracValidator(page.createTaskRepository(), null);
@@ -147,7 +140,7 @@ public class TracRepositorySettingsPageTest extends TestCase {
}
public void testValidateAutomaticAnonymous() throws Exception {
- initialize(TracFixture.TRAC_0_10_XML_RPC);
+ initialize(fixture);
page.setUserId("");
page.setPassword("");
@@ -166,8 +159,9 @@ public class TracRepositorySettingsPageTest extends TestCase {
}
public void testValidateInvalid() throws Exception {
- initialize(TracFixture.TRAC_INVALID);
+ initialize(fixture);
+ page.setUrl("http://mylyn.org/doesnotexist");
page.setTracVersion(null);
validator = page.new TracValidator(page.createTaskRepository(), null);
@@ -197,11 +191,14 @@ public class TracRepositorySettingsPageTest extends TestCase {
}
public void testClientManagerChangeTaskRepositorySettings() throws Exception {
- TaskRepository repository = TracFixture.TRAC_0_10_WEB.singleRepository();
- TracRepositoryConnector connector = (TracRepositoryConnector) TracFixture.TRAC_0_10_WEB.connector();
+ TracRepositoryConnector connector = fixture.connector();
+ TaskRepository repository = fixture.singleRepository();
+ repository.setVersion(Version.TRAC_0_9.name());
ITracClient client = connector.getClientManager().getTracClient(repository);
assertEquals(Version.TRAC_0_9, client.getAccessMode());
+ TasksUiExtensionReader.initWorkbenchUiExtensions();
+
EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
WizardDialog dialog = new WizardDialog(shell, wizard);
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracTaskEditorTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracTaskEditorTest.java
deleted file mode 100644
index bbe71a4..0000000
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracTaskEditorTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 Steffen Pingel and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Steffen Pingel - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.trac.tests.ui;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.mylyn.trac.tests.support.TracFixture;
-import org.eclipse.mylyn.trac.tests.support.TracHarness;
-
-/**
- * @author Steffen Pingel
- */
-public class TracTaskEditorTest extends TestCase {
-
- private TracHarness harness;
-
- @Override
- protected void setUp() throws Exception {
- TracFixture fixture = TracFixture.current();
- harness = fixture.createHarness();
- }
-
- @Override
- protected void tearDown() throws Exception {
- harness.dispose();
- }
-
- public void testGetSelectedRepository() throws Exception {
- TaskRepository repository = harness.repository();
- ITask task = harness.createTask("testGetSelectedRepository");
- TasksUiPlugin.getTaskList().addTask(task);
- TasksUiUtil.openTask(task);
-
- TaskListView taskListView = TaskListView.getFromActivePerspective();
- // force refresh since automatic refresh is delayed
- taskListView.getViewer().refresh();
- taskListView.getViewer().expandAll();
- taskListView.getViewer().setSelection(new StructuredSelection(task));
-
- assertFalse(taskListView.getViewer().getSelection().isEmpty());
- assertEquals(repository, TasksUiUtil.getSelectedRepository(taskListView.getViewer()));
- }
-
-}
diff --git a/org.eclipse.mylyn.trac.ui.tests/.classpath b/org.eclipse.mylyn.trac.ui.tests/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.mylyn.trac.ui.tests/.project b/org.eclipse.mylyn.trac.ui.tests/.project
new file mode 100644
index 0000000..47657d4
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui.tests/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.mylyn.trac.ui.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..5a0ad22
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..34746cc
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,396 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=48
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=80
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..7fc20b8
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,62 @@
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Mylyn based on Eclipse
+formatter_settings_version=12
+internal.default.compliance=default
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) ${year} Tasktop Technologies and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * Tasktop Technologies - initial API and implementation\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=true
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000..5e7f2bd
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Tue Aug 18 22:42:26 PDT 2009
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000..d8c6d26
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Mon Jun 25 03:02:37 GMT 2007
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000..10d0afb
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,2 @@
+commit.comment.template=${task.key}\: ${task.description}\n\nTask-Url\: ${task.url}
+eclipse.preferences.version=1
diff --git a/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.pde.prefs b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..e8f2d56
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui.tests/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,18 @@
+#Tue Apr 15 11:07:59 PDT 2008
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=2
+compilers.p.missing-bundle-classpath-entries=1
+compilers.p.missing-packages=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=0
+compilers.p.unknown-class=0
+compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=0
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/org.eclipse.mylyn.trac.ui.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.trac.ui.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..05a01fd
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Mylyn Trac Tests
+Bundle-SymbolicName: org.eclipse.mylyn.trac.ui.tests;singleton:=true
+Bundle-Version: 3.9.0.qualifier
+Bundle-Vendor: Eclipse Mylyn
+Fragment-Host: org.eclipse.mylyn.trac.ui
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.junit;bundle-version="4.5.0",
+ org.mockito;bundle-version="[1.8.4,2.0.0)",
+ org.objenesis;bundle-version="[1.0.0,2.0.0)",
+ org.hamcrest;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.equinox.security
+Export-Package: org.eclipse.mylyn.internal.trac.ui;x-internal:=true
diff --git a/org.eclipse.mylyn.trac.ui.tests/about.html b/org.eclipse.mylyn.trac.ui.tests/about.html
new file mode 100644
index 0000000..d774b07
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui.tests/about.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 25, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.ui.tests/build.properties b/org.eclipse.mylyn.trac.ui.tests/build.properties
new file mode 100644
index 0000000..9cbab3c
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui.tests/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html
+src.includes = about.html
diff --git a/org.eclipse.mylyn.trac.ui.tests/pom.xml b/org.eclipse.mylyn.trac.ui.tests/pom.xml
new file mode 100644
index 0000000..2a6285f
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui.tests/pom.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.mylyn.tasks-parent</artifactId>
+ <groupId>org.eclipse.mylyn.tasks</groupId>
+ <version>3.9.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.mylyn.trac.ui.tests</artifactId>
+ <version>3.9.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilStandaloneTest.java b/org.eclipse.mylyn.trac.ui.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilStandaloneTest.java
index f6a8dd0..a69c8fa 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilStandaloneTest.java
+++ b/org.eclipse.mylyn.trac.ui.tests/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilStandaloneTest.java
@@ -11,15 +11,20 @@
package org.eclipse.mylyn.internal.trac.ui;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
import java.util.regex.Matcher;
-import junit.framework.TestCase;
+import org.junit.Test;
/**
* @author David Green
*/
-public class TracHyperlinkUtilStandaloneTest extends TestCase {
+public class TracHyperlinkUtilStandaloneTest {
+ @Test
public void testWikiPattern2SinglePositiveMatch() {
Matcher matcher = TracHyperlinkUtil.wikiPattern2.matcher("a HyperLink there");
assertTrue(matcher.find());
@@ -27,6 +32,7 @@ public class TracHyperlinkUtilStandaloneTest extends TestCase {
assertFalse(matcher.find());
}
+ @Test
public void testWikiPattern2MultiplePositiveMatch() {
Matcher matcher = TracHyperlinkUtil.wikiPattern2.matcher("a HyperLink there and ThereIsAnother");
assertTrue(matcher.find());
@@ -36,11 +42,13 @@ public class TracHyperlinkUtilStandaloneTest extends TestCase {
assertFalse(matcher.find());
}
+ @Test
public void testWikiPattern2SingleNegativeMatch() {
Matcher matcher = TracHyperlinkUtil.wikiPattern2.matcher("no !HyperLink there");
assertFalse(matcher.find());
}
+ @Test
public void testWikiPattern2SinglePositiveMatchAtStartOfLine() {
Matcher matcher = TracHyperlinkUtil.wikiPattern2.matcher("HyperLink there");
assertTrue(matcher.find());
@@ -48,11 +56,13 @@ public class TracHyperlinkUtilStandaloneTest extends TestCase {
assertFalse(matcher.find());
}
+ @Test
public void testWikiPattern2SingleNegativeMatchAtStartOfLine() {
Matcher matcher = TracHyperlinkUtil.wikiPattern2.matcher("!HyperLink there");
assertFalse(matcher.find());
}
+ @Test
public void testWikiPattern2MixedPositiveNegativeMatch() {
Matcher matcher = TracHyperlinkUtil.wikiPattern2.matcher("a HyperLink there and ThereIsAnother but !NotHere");
assertTrue(matcher.find());
diff --git a/pom.xml b/pom.xml
index b1a91bd..4db7f92 100644
--- a/pom.xml
+++ b/pom.xml
@@ -90,5 +90,6 @@
<module>org.eclipse.mylyn.trac.core</module>
<module>org.eclipse.mylyn.trac.tests</module>
<module>org.eclipse.mylyn.trac.ui</module>
+ <module>org.eclipse.mylyn.trac.ui.tests</module>
</modules>
</project>